So is this wrong??:
Code:
$sql = " INSERT INTO users
( `user_id`, `name`, `email`, `status`, `visdate`, `visit`, `confdate`, `pickdate`, `dropdate`, `remind`, `act`, `survey` )
VALUES
( '', '$name', '$emailaddress', 'I', '$today', '1', '0000-00-00', '$pickdate', '$dropdate', '0', '0', '0' ) ";
That's the part that works! This is the part that doesn't and I can't see why and am ready to shoot myself:
Code:
if ($source == "cp")
{
$sql = " UPDATE `users`
SET status = 'B', confdate = '$today', pickdate = '$pickdate', dropdate = '$dropdate'
WHERE email = $emailaddress ";
}
else // if source from price check pages
{
$sql = " UPDATE `users`
SET status = 'I', visit = (visit + '1'), visdate = '$today', pickdate = '$pickdate', dropdate = '$dropdate', remind = '0', act = '0', survey = '0'
WHERE email = '$emailaddress' ";
}
$result = @mysql_query($sql,$connection) or die("Couldn't execute $sql query.");
Bookmarks