Click to See Complete Forum and Search --> : query error and confirmation messages


penguine
03-03-2005, 11:16 PM
Question one: Is this allowed in PHP? mysql_query($query) or die("Error");

Question two: What's the if statement syntax for a confirmation message when your query goes through properly?

SpectreReturns
03-03-2005, 11:25 PM
1) Yes

2) Write it in an if statement instead of being like that

if (mysql_query($query)) {
echo 'It worked!';
}
else {
die("Error");
}

penguine
03-04-2005, 12:00 AM
Ooh. Okay. That makes sense. Thanks. :)