powaz Posted May 13, 2007 Share Posted May 13, 2007 hi One number goes from session, second from form. Then i checking this if don't work ( if($to == $from){ echo 'error<br>'; } else{ echo 'OK' { but if i print these values they are same... how to solve this problem.. thanx for your answers Quote Link to comment https://forums.phpfreaks.com/topic/51159-need-help-with-if/ Share on other sites More sharing options...
Daniel0 Posted May 13, 2007 Share Posted May 13, 2007 Change echo 'OK' to echo 'OK'; (add a semi-colon). Also please put code tags around your code. Quote Link to comment https://forums.phpfreaks.com/topic/51159-need-help-with-if/#findComment-251876 Share on other sites More sharing options...
powaz Posted May 13, 2007 Author Share Posted May 13, 2007 Code is OK php don't show mistake if($to == $from){echo 'error';} else{echo 'OK';} Quote Link to comment https://forums.phpfreaks.com/topic/51159-need-help-with-if/#findComment-251882 Share on other sites More sharing options...
Broniukas Posted May 13, 2007 Share Posted May 13, 2007 Quote Link to comment https://forums.phpfreaks.com/topic/51159-need-help-with-if/#findComment-251895 Share on other sites More sharing options...
sasa Posted May 13, 2007 Share Posted May 13, 2007 try to trim variable before comparation Quote Link to comment https://forums.phpfreaks.com/topic/51159-need-help-with-if/#findComment-251917 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.