Exporting html form info

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Rab0099
Forum Newbie
Posts: 2
Joined: Sat Jul 17, 2010 7:06 pm

Exporting html form info

Post by Rab0099 »

Hello, I am a novice programmer and need help for a class assignment. Basically I have to export html form information to process in php, this I have no problems with. For extra credit I must also use a picture of a plane to allow users to click which seats they would like to purchase tickets for. I'm looking for a way to export the clicked hotspot into a variable to use with the php processing file or something similar.. Any help would be greatly appreciated. I don't know how things are prefered on this forum so I will attach my files as they are slightly long. Burleyson_Program5 is the html form, processform is obviously the php processing, plane.php is where I was trying to export form to include hotspot clicked.. :banghead:
Attachments
Burleyson_Program_5.zip
(129.67 KiB) Downloaded 40 times
webbox
Forum Newbie
Posts: 3
Joined: Sat Jul 17, 2010 8:40 pm

Re: Exporting html form info

Post by webbox »

Maybe it would be better if you use a two steps process.

1. Asign to each hotspot a link like "processform.php?slot=1" in the plane.php.

2. In processform.php you can retrieve the "slot" variable with

Code: Select all

$selectedslot = $_GET['slot'];
and then you will have the slot that the user select as a simple variable.

I'm not any expert, but maybe this can help you.
internet-solution
Forum Contributor
Posts: 220
Joined: Thu May 27, 2010 6:27 am
Location: UK

Re: Exporting html form info

Post by internet-solution »

Personally, I would go for javascript for seat assignment and then catch mouse clicks. Then in onclick event you can set hidden <input fields> with values.
Rab0099
Forum Newbie
Posts: 2
Joined: Sat Jul 17, 2010 7:06 pm

Re: Exporting html form info

Post by Rab0099 »

No need to be an expert, you helped greatly. Thanks.
Post Reply