Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reservation Mailer

Status
Not open for further replies.

keen01

MIS
Nov 16, 2004
73
US
I have a mailer set up but I need to figure out how to send it to the right people. It's an email reservation system. So if I have twenty options for people to pick from and they pick reserve on the third one it goes to a reservation page. They enter name, email, nights staying and so on. When they hit submit how do I make it so it emails the third reservation site.
 
It's setup like this
Campground A: email, campground website, make reservation
Campground B: email, campground website, make reservation
Campground C: email, campground website, make reservation

If someone selects make a reservation on the Campground C choice, I have a reservation page setup for date arriving and nights staying and so on. Once filled out it's just going to submit the info in an email to the campground. I want to know when they select Campground C and fill it out and hit submit how to make sure it goes to Campground C's email and not A or B. The reservation page is the same for everyone, I just figured there's got to be code to grab Campground C's email? There are over a thousand campground sites, I really don't want to make a reservation site for each individual one.
 
I would have a MySQL backend database which has a table that records campground names, IDs and email addresses. Something like

[tt]ID campground_name email_address
1 Al's campground [ignore]al@alscampground.tld[/ignore]
2 Betty's campground [ignore]bsmith@aol.tld[/ignore]
3 Charlie's Kampingplatz [ignore]cc@kamping.tld[/ignore]
4 Denise's campground [ignore]denise@denisecamp.tld[/ignore][/tt]

I would then have three scripts: select.php, reserve.php and email.php. Select.php generates an HTML form which contains a dropdown with data from the above table. The form submits to reserve.php.

Reserve.php will generate an HTML form with the fields necessary to collect reservation information from the user. That form will also contain a hidden field which holds the ID (from the above table via the form on the previous page) of the campground. This form submits to email.php.

email.php will take the data submitted from the previous form, use the ID to look up in the database the email address of the campground, prep all the reservation data, and email the data.

Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top