PDA

View Full Version : Passing form variables


mqcarpenter
08-04-2005, 04:25 PM
I need to do something very basic. I need to gather information from a form, and when they click "submit", it will take their input and add it to a URL string.

In other words:

Name:
Company:

Click Submit

Goes to http://www.yadayada.com?name=XXXXX;company=XXXXX

How can I do this simple task? Thanks

mark87
08-04-2005, 04:36 PM
You will be looking at using a server side language such as PHP to process the form, I'm sure the PHP forum will help you better.

Thinking about it, javascript is also a possibility but could cause problems if the user doesn't have javascript enabled.

Javascript solution -

window.location = "http://www.blah.com?name=" + document.formname.nametextbox.value + ";company=" + document.formname.companytextbox.value;

Something like that anyway.

Tristan Gray
08-04-2005, 04:41 PM
If it is enabled I heartily suggest going with server-side php and taking this very question over to the PHP forums.

Mark, help me out with my firefox in low resolutions issue thread!

mqcarpenter
08-04-2005, 05:13 PM
I am using ASP on this page in particular. I will try that forum. Thank you!

mark87
08-04-2005, 05:20 PM
Mark, help me out with my firefox in low resolutions issue thread!

Looks like Aerospace already helped you. :)

Tristan Gray
08-04-2005, 06:05 PM
Yeah, but it's still not quite there. These browsers need to have a serious chat and we need some new stuff like a vertical align in CSS.