powpow Posted December 29, 2010 Share Posted December 29, 2010 I have been running into an issue with using php to program a GUI. Basically there are a lot of forms that some times send you to a new page and other forms that refresh the pages. It has been increasingly harder to divide my code from the before the Post and after the post. This page is my checkbox page and is actually checking if any of the check boxes have values. Is there an easier way of doing this? <?php /* ~~~~~~~~MMARS :34~~~~~~~~~~~~~~ ~~~~~~~~LCM :53~~~~~~~~~~~~~~ ~~~~~~NMSEC :85~~~~~~~~~~~~~~ ~~~~~~ClassM :107~~~~~~~~~~~~~~ ~~~~~~~CAPS :128~~~~~~~~~~~~~~ ~~~~~~~PMIS :155~~~~~~~~~~~~~~ ~~~~~~WrkComp:180~~~~~~~~~~~~~~ */ include 'db.php'; include 'function.php'; echo "Stage 1" . "</ br>"; //Once this form is submitted if(isset($_POST['MMars'] || $_POST['LCM'] || $_POST['NMSec'] || $_POST['ClassMMars'] || $_POST['CAPS'] || $_POST['PMIS'] || $_POST['WrkComp'])){ Parse error: syntax error, unexpected T_BOOLEAN_OR, expecting ',' or ')' in /var/www/html/web2/test2/test.php on line 19 Quote Link to comment https://forums.phpfreaks.com/topic/222940-error-that-i-cant-see/ Share on other sites More sharing options...
Maq Posted December 29, 2010 Share Posted December 29, 2010 You can't use the isset() method like that. It can take comma separated values but that would be equivalent to &&, not ||. Unfortunately, AFAIK, you may have to invoke that method on each POST. Quote Link to comment https://forums.phpfreaks.com/topic/222940-error-that-i-cant-see/#findComment-1152715 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.