View Full Version : Adding text box variables to url

01-26-2012, 09:25 PM
Hi Guys

Please forgive my ignorance, I am a newbie to HTML etc, I just want to perform a simple task but do not know where to begin.

I want to make a very simple website with different text fields, eg:

Text1 :(text box to enter text)
Text2 : (text box to enter text)

And then I want to take that entered text and insert it into a URL when the person has completed entering the text and clicks a button, eg:


So essentially I want the text to be injected into a URL and path followed when the button is clicked, am I making sense or do I sound like a nut?

01-26-2012, 09:32 PM
This belongs in the PHP forum, however, to do this you:

<form action="yourfile.php" method="get">
<input type="text" name="whatever" />
<input type="submit" name="submit" value="Sumbit" />

So now when they click submit, they will be sent to: yoururl.com/yourfile.php?whatever=what-they-inputted

01-27-2012, 07:14 AM
Thanks, My apolhies for not posting this in the correct section, i was not sure as what section it would fall under.

Please assist me further, this is what i would like to achieve:


So i want a radio box selection to state Action=(set/Delete/Query)
and a text field to state: host=(name=examle)

and a submit button which will fill the variables into the url and follow that url?