todayme Posted March 6, 2007 Share Posted March 6, 2007 What the f... am I doing wrong? if($authenticate!=$password){ exit(); ) Link to comment https://forums.phpfreaks.com/topic/41402-simple-if-statement/ Share on other sites More sharing options...
karthikeyan_coder Posted March 6, 2007 Share Posted March 6, 2007 echo ($authenticate); and echo($password) and see the if() Link to comment https://forums.phpfreaks.com/topic/41402-simple-if-statement/#findComment-200549 Share on other sites More sharing options...
mmarif4u Posted March 6, 2007 Share Posted March 6, 2007 If ($call==$session[nsername]){ echo "username ok"} esle {echo "invalid username"} Ur statement style is right. Link to comment https://forums.phpfreaks.com/topic/41402-simple-if-statement/#findComment-200551 Share on other sites More sharing options...
simcoweb Posted March 6, 2007 Share Posted March 6, 2007 Are you getting an error? If so, please post. I think, if you are, it's because you have a right parentheses instead of a curly bracket to close your if statement. Yours: if($authenticate!=$password){ exit(); ) Correct: if($authenticate!=$password){ exit(); } Link to comment https://forums.phpfreaks.com/topic/41402-simple-if-statement/#findComment-200552 Share on other sites More sharing options...
todayme Posted March 6, 2007 Author Share Posted March 6, 2007 Yes that was the problem thanks heaps Link to comment https://forums.phpfreaks.com/topic/41402-simple-if-statement/#findComment-200561 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.