I want to create a Get Url String with an if statement.
Here is my code:
$value = $_GET['value'];
$fullname = "John Doe";
$email = "johndoe@email.com";
echo "value: " . $value;
if($value = "fullname")
echo "fullname: " . $fullname;
elseif($value = "email")
echo "email: " . $email;
else
echo "fullname: " . $fullname;
echo "<br>";
echo "email: " . $email;
It returns both fullname and email each time even if I enter only the fullname or email value. What am I doing wrong? Thanks
Aucun commentaire:
Enregistrer un commentaire