Re: User "confirm-event" switch
Posted: Wed May 21, 2008 5:24 am
You guys are helpful! I'm learning every minute. I'll be sure to check out the tutorials you mentioned, califdon, and thank you, dbemowsk, for the bit on code redundancy. I'm beginning to see some broader perspective and will definitely keep these things in mind when further developing my php.
As for the links, it seemed no matter how I broke them down with single-quotes, double-quotes, different variables, they just didn't accept the "$" sign in the variables. At least that's what my countless eliminations of various potential problems showed me. I went with the FORM/Submit solution, and this is working out fine except for one thing. When adding the confirmation data to my confirmation table, I get a syntax error. And I don't just go in here asking for help, I've tried every combination of quotes around the variables, parentheses, and what have you, but I still get the error. Here's some code:
Now, here's what I get from the server:
Once again thank you for lending me your expertise.
As for the links, it seemed no matter how I broke them down with single-quotes, double-quotes, different variables, they just didn't accept the "$" sign in the variables. At least that's what my countless eliminations of various potential problems showed me. I went with the FORM/Submit solution, and this is working out fine except for one thing. When adding the confirmation data to my confirmation table, I get a syntax error. And I don't just go in here asking for help, I've tried every combination of quotes around the variables, parentheses, and what have you, but I still get the error. Here's some code:
Code: Select all
// confirm/deny date
if(isset($_GET['confirm']) AND isset($_GET['date_id'])) {
$date_id=$_GET['date_id'];
$confirm=$_GET['confirm'];
$addconf = mysql_query("INSERT INTO oever_conf (confirmation, user_id, date_id) WHERE date_id = ".$date_id." AND user_id = ".$session_name." VALUES ('$confirm', '$session_name', '$date_id')") or die(mysql_error());
}
// END confirm/deny date
Code: Select all
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 date_id = 5 AND user_id = Jason VALUES ('1', 'Jason', '5')' at line 1