Having an issue that I just spend 8 hours on. I am trying to pass variables to my php page please look at the following code snippet.
the id value is passed but I can't access $l_name or $f_name variables on next page
Even using an array I can't find variables $f_name and $l_name I've been playing around trying to figure out how to do this. But my php info shows the id variable and value but no l_name or f_name
Any suggestions on how to do this? the value is passed when an option is select from drop down.
Code:
while ($row = mysql_fetch_array($result)) {
$id = $row['id'];
$f_name = $row['f_name'];
$l_name = $row['l_name'];
$option_block .= "<option value=\"$id\">$l_name, $f_name</option>";
the id value is passed but I can't access $l_name or $f_name variables on next page
Code:
$sql = "SELECT
f_name, l_name, address1, address2, address3, postcode, country, prim_tel, sec_tel, email, birthday
FROM $table_name
WHERE id = \"$_POST[id]\"
";
$result = @mysql_query($sql, $connection) or die ("Couldn't execute query.");
while ($row = mysql_fetch_array($result)) {
$_POST["f_name"] = $row['f_name'];
$l_name = $row['l_name'];
$address1 = $row['address1'];
$address2 = $row['address2'];
$address3 = $row['address3'];
$postcode = $row['postcode'];
$country = $row['country'];
$prim_tel = $row['[prim_tel'];
$sec_tel = $row['sec_tel'];
$email = $row['email'];
$birthday = $row['birthday'];
}
?>
Even using an array I can't find variables $f_name and $l_name I've been playing around trying to figure out how to do this. But my php info shows the id variable and value but no l_name or f_name
Any suggestions on how to do this? the value is passed when an option is select from drop down.