Link to home
Start Free TrialLog in
Avatar of Robert Granlund
Robert GranlundFlag for United States of America

asked on

PHP If isset forms

Is there a way to check if one of two forms has been submitted.  Meaning I want at least one of the forms to have been submitted if info is shown.

<?php
 if(isset($_POST['get_quote'])) || if(isset ($_POST['get_empty_quote'])) { DO SOMETHING}
?>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of gr8gonzo
gr8gonzo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Anwar Saiah
Anwar Saiah

other than a syntax error with the parentheses  corrected by gr8gonzo ,I see no reason why your code will not work.
the OR || operator means the if will return true if either of the two conditions is met.(At least one of them)
You are submitting the forms to the same action page?