Avatar of Robert Granlund
Robert Granlund
Flag 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

PHP

Avatar of undefined
Last Comment
Dave Baldwin

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
gr8gonzo

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
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)
Dave Baldwin

You are submitting the forms to the same action page?
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck