Jump to content

check if this variable or this one are empty


real_illusions

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?

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

Archived

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

×
×
  • Create New...