Thanks a ton. I had to tweak a bit but now got the replacement going but now a related issue has cropped up. I select the customer name from the customer table to populate Shipping using the foll.
So :
a) How do i ensure that both customerid(field name : cid) and company name(field name : company) get posted to the form processing page ?
Form 1:
Customer:<td><select name="customer"><option value="">[Select One]
<?php
mysql_connect("localhost", $dbname, $dbpasswd )
or die ("Unable to connect to server.");
mysql_select_db($database)
or die ("Unable to select database.");
$result = mysql_query("SELECT DISTINCT `Company` FROM `Adbk` ORDER BY `Company` asc ");
if ($myrow = mysql_fetch_array($result)) {
do {
printf("<option>
%s", $myrow["Company"]);
} while ($myrow = mysql_fetch_array($result));
}
?></select></td>
Form2 :
<?php
$customer = $_POST["customer"];
mysql_connect("localhost", $dbname, $dbpasswd )
or die ("Unable to connect to server.");
mysql_select_db($database)
or die ("Unable to select database.");
$sql = "INSERT INTO `Shipping` (`Company` and so on ) VALUES ('$customer')
and so on...
?>
I want both values $cid and $customer to get posted to the form processing page.
Thanks.