I have a form for book registration, so by default I have a text field with a button besides that for the author name, but when the user click the button I need the another text box with another button besides that created, and if again it click another created and so on, and the function of those new buttons created besides the text field is that when they clicked the button with its text field should be deleted.

all these should be done without refreshing the page.

can anyone help me through that ?

Making the text box and button appear can be done with basic JavaScript. However, making calls to the server to delete records without a page refresh will require AJAX.

you are right, but I made a draft, it is not adding the row after the author, and istead it append new rows at the end of the table.

also I want to know, any difference between creating this by JAVA SCRIPT or AJAX?

<title>By AJAX</title>

<script type="text/javascript">
var my_row = null;

function addElement()

var row = document.createElement("TR");
			var tbl = document.getElementById("tblView");
			var td1 = document.createElement("TD");
			td1.innerHTML = "Author Name:";
			var td2 = document.createElement("TD");
			td2.innerHTML = "<input name='authorName' type='text' id='authorName' size='60'>";
			var td3 = document.createElement("TD");
			td3.innerHTML = "<input type='button' name='cmdDelete' value='Remove' />";
			my_row = document.getElementById("my_row");
			document.body.insertBefore(tbl.appendChild(row), my_row);


<form name="form1" method="post" action="">
  <table width="50%" border="0" cellpadding="3" id="tblView">
      <td>Book Name: </td>
        <input name="txtBookName" type="text" id="txtBookName" size="60">
      <td>Book Title: </td>
        <input name="txtBookTitle" type="text" id="txtBookTitle" size="80">
    <tr id="my_row">
      <td>Author Name: </td>
        <input name="authorName" type="text" id="authorName" size="60">
        <input name="cmdAddMore" type="button" id="cmdAddMore" value="More Author" onClick="addElement()" />
      <td>Book Subject </td>
        <select name="selectSubject">
          <option value="Programming">Programming</option>
          <option value="Database">Database</option>
          <option value="Web-Design">Web-Design</option>
          <option value="Math">Math</option>
          <option value="Business">Business</option>
          <option value="Management">Management</option>
      <td>Book Shelf: </td>
        <input name="txtBookShelf" type="text" id="txtBookShelf">
        <input name="cmdSaveBook" type="submit" id="cmdSaveBook" value="Save Book">

also the I could not figure out the remove function ?

Kind of, AJAX is basically a buzz word used to describe a connection between the server and the client using an xmlhttp request. Somewhat similar to how you have to establish a connection between the server and the database. Here is a basic tutorial that goes over a basic PHP,AJAX, and MySQL application.