dc_jt Posted January 13, 2010 Share Posted January 13, 2010 Hi I have a drop down box which lists months from 0 - 11 and also includes a "Please select..." option which value is set to "". However, when I submit the form with 0, it is not recognised as a value, therefore when I do if($_POST) this is not returned. Is there a way for $_POST to recognise 0 as a value rather than nothing? Hope that makes sense! Thanks Quote Link to comment Share on other sites More sharing options...
dc_jt Posted January 13, 2010 Author Share Posted January 13, 2010 In plain english, if someone enters 0 I dont want if(!$_POST) to pick it up. Quote Link to comment Share on other sites More sharing options...
dc_jt Posted January 13, 2010 Author Share Posted January 13, 2010 Sorry, wrong forum. Can someone please move this to PHP Coding?? Quote Link to comment Share on other sites More sharing options...
DarkPrince2005 Posted January 13, 2010 Share Posted January 13, 2010 Try this if statement: if(isset($_POST) && $_POST['dropdown_name'] != "") Quote Link to comment Share on other sites More sharing options...
dc_jt Posted January 14, 2010 Author Share Posted January 14, 2010 Try this if statement: if(isset($_POST) && $_POST['dropdown_name'] != "") Thanks! Quote Link to comment 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.