View Full Version : Probably a very basic question

05-31-2004, 09:37 PM
Hi all.

My first post here (registered today) and I'm pretty sure this is the right forum but I might be wrong. Apologies if thats the case.

I'm after a bit of advice/help if anyone can offer any.

I have a fairly basic html page that I'm trying to get some data from into a form which is then run through a cgi script.

The data I want is in a drop-down : basically, the user chooses, say "option 1" from the dropdown, which has a value, eg "1" associated with it. I then hav a submit button below, and I want to be able to extract the "value" data from the dropdown and place it in a non-editable field in the next page. This final page, on submission, runs through a cgi script which emails me the details the user has just supplied, complete with the value from two pages previously. Or, more accurately, at the moment it does nothing because I'm a relative novice and I'm completely stumped. If ness, the "option" could be modified to become the "value" as it were, if this would make it simpler.

I think JS can do what I'm after, but if not could it be done with .php or .asp?

I must be honest and say that my knowledge of JS is pretty low to say the least. I'd be after a customisable script if anyone knows of one, as I dont have the know-how to write one myself at the moment.

Any help anyone could offer would be great.

Thanks in advance


05-31-2004, 10:12 PM
assuming your 1st page is a form, it should upon submitting it to the next page send the value of the forms element which then in should be accesible in the server language in between.

for php it could be global defined meaning you would have variables corresponding to the names of the form elements or you can get them in the post,get or request collections.

you can use echo or print to put the variables value into the input fields on the 2nd page.

JS can be used to do the same effect but it would require more code, and have the distinct requirement that js is enabled on the browser of the user.

06-01-2004, 04:24 PM
Thanks for your reply.

Managed to accomplish it using php after all