i have got a form which i have created already what i want now is something like once i have fill out the form and i have more than one types like entrying school detail if you attended more than one school click add to enter a new school with same kind of form here is my code <table class="tbl" border="0" cellspacing="1" cellpadding="5"width="50%"> <tr> <td class="hr">Order Type</td> <td class="dr"><input type="text" name="LineOrderTypeID" value=""></td> </tr> <tr> <td class="hr">Telephone Number </td> <td class="dr"><input type="text" name="TelephoneNumber2" maxlength="45" value=""></td> </tr> <tr> <td class="hr">Existing Lines Number</td> <td class="dr"><input type="text" name="NumberExistingLines" value=""></td> </tr> <tr> <td class="hr">New Lines Number</td> <td class="dr"><input type="text" name="NumberNewLines" value=""></td> </tr> <tr> <td class="hr">From Line Type</td> <td class="dr"><?php $result = mysql_query("SELECT LineTypesID, Description FROM LineTypes"); echo "<select name=\"LineTypesID\">"; while ($row=mysql_fetch_array($result)) { $id = $row['LineTypesID']; $description = $row['Description']; echo "<option value=\"$id\">$description</option>"; } echo "</select>"; ?> </td> </tr> <tr> <td class="hr">To Line Type </td> <td class="dr"><?php $result = mysql_query("SELECT LineTypesID, Description FROM LineTypes"); echo "<select name=\"LineTypesID\">"; while ($row=mysql_fetch_array($result)) { $id = $row['LineTypesID']; $description = $row['Description']; echo "<option value=\"$id\">$description</option>"; } echo "</select>"; ?> </td> </tr> <tr> <td class="hr">Is Feature Line </td> <td class="dr"><select name="IsFeatureLine"> <option value=""></option> <option value="Yes">Yes</option> <option value="No">No</option> </select></td> </tr> <tr> <td class="hr">Is Fax </td> <td class="dr"><select name="IsFax"> <option value=""></option> <option value="Yes">Yes</option> <option value="No">No</option> </select></td> </tr> <tr> <td class="hr">Is PDQ </td> <td class="dr"><select name="IsPDQ"> <option value=""></option> <option value="Yes">Yes</option> <option value="No">No</option> </select></td> </tr> <tr> <td class="hr">Is DSL </td> <td class="dr"><select name="IsDSL"> <option value=""></option> <option value="Yes">Yes</option> <option value="No">No</option> </select></td> </tr> <tr> <td class="hr">Is Phone </td> <td class="dr"><select name="IsPhone"> <option value=""></option> <option value="Yes">Yes</option> <option value="No">No</option> </select></td> </tr> <tr> <td class="hr">Line Extra</td> <td class="dr"><?php $result = mysql_query("SELECT LineExtraTypeID, Description FROM LineExtraTypes"); echo "<select name=\"LineExtraTypeID\">"; while ($row=mysql_fetch_array($result)) { $id = $row['LineExtraTypeID']; $description = $row['Description']; echo "<option value=\"$id\">$description</option>"; } echo "</select>"; ?> </td> </tr> </table>
I dont understand the first couple of lines of your post. From what I can fathom of your request you would probably need to use javascript not php
You can also do it with PHP, but it means the form will be sent each time the user clicks the "add" button, and you'll have to get the form data and put it in the form again, and create the form dynamically to be able to add a new field to it.
if you dont want user to feel like submitting form each and every time, go for ajax, where in send the details to DB using ajax, at the same time display important order details at the bottom of the page,