Monkuar Posted March 16, 2012 Share Posted March 16, 2012 $code = array("03","09"); if (!in_array($_POST['CODE'], $code)); message("Sorry, not today"); my $_POST['CODE'] is <input type=hidden name=CODE value='03'> still not being validated.. hmm Quote Link to comment https://forums.phpfreaks.com/topic/259058-stupid-question/ Share on other sites More sharing options...
dmikester1 Posted March 16, 2012 Share Posted March 16, 2012 I always thought the type value and the name value had to be in quotes like so: <input type='hidden' name='CODE' value='03'> Not sure if that will fix it or not. Mike Quote Link to comment https://forums.phpfreaks.com/topic/259058-stupid-question/#findComment-1328053 Share on other sites More sharing options...
AyKay47 Posted March 16, 2012 Share Posted March 16, 2012 the syntax is incorrect, you are ending the if statement with a terminating ; if (!in_array($_POST['CODE'], $code)) message("Sorry, not today"); Quote Link to comment https://forums.phpfreaks.com/topic/259058-stupid-question/#findComment-1328054 Share on other sites More sharing options...
Monkuar Posted March 16, 2012 Author Share Posted March 16, 2012 $code = array("03","09"); if (!in_array($_POST['CODE'], $code)){ message("Sorry, not today"); } Ty aykay topic solved Quote Link to comment https://forums.phpfreaks.com/topic/259058-stupid-question/#findComment-1328055 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.