Jump to content

[SOLVED] silly query error?


wmguk

Recommended Posts

Hey,

 

This is my code:

if ($ceremony == "Wedding" || "Civil Partnership")
{
//CONNECT TO our_info - Get the message to add to guestbook
$result = mysql_query("SELECT * FROM our_info WHERE username = '$user'");
while($row = mysql_fetch_array($result)) 
{ 
$guestmess = $row['guestmess'];
$contact = $row['contact'];
$contemail = $row['email'];

//Add the message to Album Guestbook
mysql_query("INSERT INTO guestbook( login, fromname, fromemail, message, iwauth, custauth) VALUES ('$login','$contact', '$contemail', '$guestmess', 'yes', 'yes');");
}}
else
{
}

 

However the OR function doesnt seem to work, I only want to add the message if ceremony is Wedding OR Civil Partnership. however it adds it no matter what the ceremony is?

 

Any ideas?

Link to comment
https://forums.phpfreaks.com/topic/107177-solved-silly-query-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.