You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'where, signup, prodid, order_number, card_holder_name) VALUES (
I keep on getting this, for the below code:
<?
include("config.php");
$a = new database();
$a->connect();
$prodid = $_POST['product_id'];
$order_number = $_POST['order_number'];
$card_holder_name = $_POST['card_holder_name'];
/*$date = "04/30/1973";
list($month, $day, $year) = split('[/.-]', $date);
echo "Month: $month; Day: $day; Year: $year<br />\n";*/
$userinfo = $_COOKIE['order'];
list($name, $email, $domain, $referral, $username, $pword, $plan) = split('[,]', $userinfo);
$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
$prodid = $_POST['product_id'];
//Add the user.
$add_user = "INSERT INTO clients (name, email, un, pw, ip, domain, plan, where, signup, prodid, order_number, card_holder_name) VALUES ('$name', '$email', '$username', '$pword', '$hostname', '$domain', '$plan', '$referral', '".time()."' '$prodid', '$order_number', '$card_holder_name')";
mysql_query($add_user) or die(mysql_error());
?>
Can anyone see anything wrong with this? I sure can't - I'm trying to write an order form return page, from 2checkout.com - so that it can confirm a user HAS in fact ordered (By adding them to the database, then someone checking to make sure they really did order).