Hi people,
Can anyone tell me why the $pay_id value that is sent with the header() gives a "0" value all the time. Why can't i get the correct id value to show?
<?
{
$pay_id = doubleval($pay_id);
$name = addslashes($name);
$date_in = date("Ymd");
$db = mysql_connect('localhost', '', '');
if (!$db)
{
echo "Error: Could not connect to database. Please try again later.";
exit;
}
mysql_select_db("rip");
$query = "insert into securepay(pay_id, name, address, city, postcode, telephone, instructions, ponum, optional_info, amount, merchant_id, date_in)
values('$pay_id','$name','$address','$city','$postcode','$telephone','$instructions','$ponum','$optional_info','$amount','$merchant_id','$date_in')";
$result=mysql_query($query);
if($result)
header ("Location: sales_cc.php?id=$pay_id");
}
echo "<br><a href=\"membership.php\">Back to Members</a>";
?>
Any thoughts or advice?
Suzie