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 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 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"); 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 Link to comment https://forums.phpfreaks.com/topic/259058-stupid-question/#findComment-1328055 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.