Jorge Batres
asked on
if elseif PHP Script problem
Hi, I have a script to email hotel reservation requests. There are several hotels that share the same values and most of them use a general request email form I will call hotel-request. A few hotels have somewhat different values that do not conform to the standard / regular form hotel-request, so I have to include separate email forms for them like, hotel-one, hotel-two and so on. My problem is that if I want to request a hotel with a specific name like hotel-one, the script is sending both form emails (hotel-request and hotel-one) Could you please help me correct this?
Here is part of the script:
Thanks,
Jorge
Here is part of the script:
case "reservation_request":
include_once(LEVEL."inc/emailer/emailer.php");
if($_POST["form_type"] == "hotel-one"){
SendEmail("hotel-one-request", $_POST);
}
elseif($_POST["form_type"] == "hotel-two"){
SendEmail("hotel-two-request", $_POST);
}
elseif($_POST["form_type"] == "hotel-three"){
SendEmail("hotel-three-request", $_POST);
}
elseif($_POST["form_type"] == "hotel-four"){
SendEmail("hotel-four-request", $_POST);
}
else {
SendEmail("hotel-request",$_POST);
}
Thanks,
Jorge
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Haha - been there ... done that :)
ASKER
Thanks again,
Jorge