real_illusions Posted March 14, 2011 Share Posted March 14, 2011 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 More sharing options...
justsomeguy Posted March 14, 2011 Share Posted March 14, 2011 That's the way to do it, so I would say that one of those variables is not empty. Use var_dump to see what the values are. Link to comment Share on other sites More sharing options...
real_illusions Posted March 14, 2011 Author Share Posted March 14, 2011 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.