Jump to content

if($_GET is equal to something


brem13

Recommended Posts

thank you, i tried that and still the same thing

modified code to look like

if (isset($_GET['message']) && $_GET['message'] == 'sent') 
	mysql_query("DELETE FROM sent WHERE id = '$id' AND userto = '$userLoggedIn'");
else
	mysql_query("DELETE FROM messages WHERE id = '$id' AND userto = '$userLoggedIn'");

and the url is  messages.php?id=4&message=sent&delPerm=yes

How do you know it's not working?

 

If you change the "if" statement to be:

<?php
if (isset($_GET['message']) && $_GET['message'] == 'sent') {
    echo "is sent<br>\n";
} else {
    echo "is NOT sent<br>\n";
}
?>

What is display?

 

Ken

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.