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'; Link to comment https://forums.phpfreaks.com/topic/159397-solved-check-if-choice-has-made/ Share on other sites More sharing options...
jackpf Posted May 23, 2009 Share Posted May 23, 2009 Yeah, so what's wrong with that? Link to comment https://forums.phpfreaks.com/topic/159397-solved-check-if-choice-has-made/#findComment-840778 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. Link to comment https://forums.phpfreaks.com/topic/159397-solved-check-if-choice-has-made/#findComment-840782 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!'; } Link to comment https://forums.phpfreaks.com/topic/159397-solved-check-if-choice-has-made/#findComment-840793 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. Link to comment https://forums.phpfreaks.com/topic/159397-solved-check-if-choice-has-made/#findComment-840797 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!'; } Link to comment https://forums.phpfreaks.com/topic/159397-solved-check-if-choice-has-made/#findComment-840798 Share on other sites More sharing options...
tyra Posted May 23, 2009 Author Share Posted May 23, 2009 Thank you! Link to comment https://forums.phpfreaks.com/topic/159397-solved-check-if-choice-has-made/#findComment-840806 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.