Page 1 of 1

Exporting html form info

Posted: Sat Jul 17, 2010 7:14 pm
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:

Re: Exporting html form info

Posted: Sat Jul 17, 2010 9:46 pm
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.

Re: Exporting html form info

Posted: Sun Jul 18, 2010 4:41 am
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.

Re: Exporting html form info

Posted: Wed Jul 21, 2010 7:11 pm
by Rab0099
No need to be an expert, you helped greatly. Thanks.