How do I check to see if a value was posted from a form in PHP?

I'm new to PHP. I have a form with two drop down boxes. I need to check if the user has submitted the form by selecting one or both of the values so i can then use those values to query a database.

In ASP I would just check to see if the length of the request was greater than zero.
How do I do this in PHP?
Donnie WalkerAsked:
Who is Participating?
 
hieloConnect With a Mentor Commented:
assuming your dropdown has name="state", you would use:
if( isset($_POST['state']) && !empty($_POST['state']) )
{
...
}
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.