Toy Posted September 29, 2010 Share Posted September 29, 2010 <?php if (!isset($_GET['register'])) { echo "register stuff here"; } elseif (!isset($_GET['login'])) { echo "login stuff here"; } elseif (!isset($_GET['forgotpassword'])) { echo "password recovery stuff here"; } else { echo "default page stuff here"; } ?> you get what i'm going for, but it kinda messes up this way with different contents on different places? help Link to comment https://forums.phpfreaks.com/topic/214741-pretty-basic-question/ Share on other sites More sharing options...
meltingpoint Posted September 29, 2010 Share Posted September 29, 2010 What is messing up? Link to comment https://forums.phpfreaks.com/topic/214741-pretty-basic-question/#findComment-1117254 Share on other sites More sharing options...
Toy Posted September 29, 2010 Author Share Posted September 29, 2010 What is messing up? you get the wrong content for the GET's Link to comment https://forums.phpfreaks.com/topic/214741-pretty-basic-question/#findComment-1117267 Share on other sites More sharing options...
the182guy Posted September 29, 2010 Share Posted September 29, 2010 You're using the NOT operator (!) on each if statement, so the evaluation is being reversed. Example, your first if statement reads... If $_GET['register'] is NOT set, then do this... Link to comment https://forums.phpfreaks.com/topic/214741-pretty-basic-question/#findComment-1117268 Share on other sites More sharing options...
Toy Posted September 29, 2010 Author Share Posted September 29, 2010 You're using the NOT operator (!) on each if statement, so the evaluation is being reversed. Example, your first if statement reads... If $_GET['register'] is NOT set, then do this... thank's i'll try removing the ! should probs work Link to comment https://forums.phpfreaks.com/topic/214741-pretty-basic-question/#findComment-1117283 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.