Jump to content

Archived

This topic is now archived and is closed to further replies.

dc_jt

!$_POST

Recommended Posts

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

Share this post


Link to post
Share on other sites

In plain english, if someone enters 0 I dont want if(!$_POST) to pick it up.

Share this post


Link to post
Share on other sites

Sorry, wrong forum. Can someone please move this to PHP Coding??

Share this post


Link to post
Share on other sites

Try this if statement:

 

if(isset($_POST) && $_POST['dropdown_name'] != "")

 

Thanks!

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.