tyra Posted May 23, 2009 Share Posted May 23, 2009 how to tell php that it check if the choice has made? if(isset($_POST['button'])) if user presses button then he must have choice made othervise echo 'you need to choose something'; Quote Link to comment Share on other sites More sharing options...
jackpf Posted May 23, 2009 Share Posted May 23, 2009 Yeah, so what's wrong with that? Quote Link to comment Share on other sites More sharing options...
tyra Posted May 23, 2009 Author Share Posted May 23, 2009 if it doesn't contain any value with it, it still does other things. Quote Link to comment Share on other sites More sharing options...
tyra Posted May 23, 2009 Author Share Posted May 23, 2009 Can you tell me how to write it properly ? if(isset($_POST['button'])) && ($_POST['form'] = !null)){ echo 'choose something'; } else{ echo 'great choice!'; } Quote Link to comment Share on other sites More sharing options...
jackpf Posted May 23, 2009 Share Posted May 23, 2009 if(isset($_POST['button']) && $_POST['form'] != null){ echo 'choose something'; } else{ echo 'great choice!'; } However, that is dependant on whether "button" and "form" are real fields in the form. Quote Link to comment Share on other sites More sharing options...
DarkSuperHero Posted May 23, 2009 Share Posted May 23, 2009 if(isset($_POST['button']) && ($_POST['form'] != null)) { echo 'choose something'; } else{ echo 'great choice!'; } Quote Link to comment Share on other sites More sharing options...
tyra Posted May 23, 2009 Author Share Posted May 23, 2009 Thank you! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.