Pulldown selection to form
Posted: Sun Sep 01, 2002 11:17 pm
Inserting this pulldown menu script to provide selections from a database field in a form to submit to the database . However I need the result of the selection to be sumitted with the rest of the data in the form to the database. As it is, none of the other data is being submitted either.
<form action="new_entry2.php">
<table width="406" border="0">
<tr>
<td width="128"><b>Name:</b></td>
<td width="268">
<input type="text" name="name2" size="40" maxlength="40">
</td>
</tr>
<tr>
<td width="128"><b>Chapter:</b></td>
<td width="268">
<tr>
<td width="128"><b>Category:</b></td>
<td width="268">
<input type="text" name="category2" size="40" maxlength="40">
</td>
</tr>
<form action="new_entry2.php">
<table width="406" border="0">
<tr>
<td width="128"><b>Name:</b></td>
<td width="268">
<input type="text" name="name2" size="40" maxlength="40">
</td>
</tr>
<tr>
<td width="128"><b>Chapter:</b></td>
<td width="268">
Code: Select all
<?
include('dbconnect.php');
include('font_setting2.htm');
$query = ("select * from tbl_chapter");
$result = mysql_query($query) or die("Query fail");
if (mysql_num_rows($result) == 0)
{
} else
{
//echo "<B> Current Chapters List </B>";
echo "<select name='select'>";
while($row = mysql_fetch_array($result))
{
echo "<option>" . $rowї'chapter_name'] . "</option>";
}
}
?><td width="128"><b>Category:</b></td>
<td width="268">
<input type="text" name="category2" size="40" maxlength="40">
</td>
</tr>