Jump to content

check if this variable or this one are empty


real_illusions
 Share

Recommended Posts

Currently have this<?phpif((!empty($_POST['variableone'])) || (!empty($_POST['variabletwo']))) {// do something} ?>But it doesn't work correctly. The // do something happens even when both those variables are empty.Is there anyway of checking to see if either of those variables are empty or not?

Edited by real_illusions
Link to comment
Share on other sites

Oh ok :)Seems it didn't work cos I was refreshing the page, and a tickbox was unticked after the form was sent as its not checked when the form is returned..hence me thinking the variable was empty, but it wasn't.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...