wanting to mkove from html to php

They have: 71 posts

Joined: Oct 2005

ok well i would like to make this page: http://everydaysolutionsrx.com/eguideselection.htm this is a htm page, i would like to have the end user select the guide they want then enter there e-mail and name into the form then once they hit the submit button i would like it to go to the perspective page they selected...

i was told that i could achivie this affect using PHP but i have no idea where to start... so i was hoping that someone could point me in the right direction as to what i need to do...

thanks in advance!

Danny G Guillory Jr
[email protected]
337.303.6453

They have: 7 posts

Joined: Jan 2006

this is actually quite simple. simply create a new file, with a php extension. in it, you should hve something to this effect:

<?
$eguide=$_POST['eguide'];
header("Location: $eguide");
?>

now your form on the page will require some modification. you must change the action attribute of the element to whatever the filename of the above php file is. Also,y ou will need to modify your select (drop down) element by defining it with a name. The above example uses the name "eguide". You will also have to assign each option a value. The value of each option should be the filename of the eguide. Example:

Ringworm
Flea/Skin Repair
Ear Mites
Mange
Staph Infection
Scabies
Human Ringworm
Athlete's Foot
Mites

this is an over simplified version. I personally would assign each option in the dropdown an ID number, and then int he php file, I would have either a switch block, or some ifs to determine where to send the user. But this should work just fine for you. There is no built in processing of the name or email address. Not sure what you want to do with those. Log them to a file, add them to a database, or send a message to the email address with the URL to the file. Let me know and I can help you with that as well.

Matt Pegler
MyFreeCounter Owner/Operator
http://www.MyFreeCounter.net - free hit, realtime, and click counters, as well as statistics

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.