i am trying to retrieve a data according to the register form,in my second form i can find my drop down list working but when i select one of it is not displaying the information in the table that was registered from my first page.
this is my code.
mysql_select_db($database_universal, $universal);
//to select the invoice number from first page//
$query_ProForma = "SELECT inv_no,product_name FROM ho_add_stock_proforma";
$ProForma = mysql_query($query_ProForma, $universal) or die(mysql_error());
$row_ProForma = mysql_fetch_assoc($ProForma);
$totalRows_ProForma = mysql_num_rows($ProForma);
$insertID = mysql_insert_id();
//to display the drop down list which is doing and working//
<p>Pro Forma Invoice Number<br />
<label for="pro_inv_no"></label>
<select name="pro_inv_no" autofocus="autofocus" class="dropdown_long" id="pro_inv_no">
<option value="Selected">Select Invoice Number</option>
<?php
do {
?>
<option selected="selected" value="<?php echo $row_ProForma['inv_no']?>"><?php echo $row_ProForma['inv_no']?></option>
<?php
} while ($row_ProForma = mysql_fetch_assoc($ProForma));
$rows = mysql_num_rows($ProForma);
$id =" pro_forma_inv_no";
$selected="selected";
if($id==$selected){
for ($j = 0 ; $j < $rows ; ++$j){
mysql_data_seek($ProForma,$rows[0]);
$row_ProForma = mysql_fetch_array($ProForma);
} }
?>
</select>
</p>
//to display the data to the field after selecting on the option which is not doing//
<td scope="col" > PRODUCT NAME<input name="pro_product_name" type="text" class="table_fields" id="product_name"
size="10" value="
<?php
echo $row_ProForma['product_name']; ?>" />
</td>