View Full Version : Setting a variable using a text box

Jay Vincent
11-22-2003, 12:53 AM
Hi, this could possibly be an obvious question, but I've just started learning PHP, so, yeah give me a chance :P.

What i would like to do is for the user to define what a variable should equal by typing it into a textbox.


If the user typed mobile phone into the textbox...

or if the user type internet into the textbox...

You get the idea :)

Thanks in advance


11-22-2003, 12:57 AM
Once the form has been submitted by the POST method, you can use:

$variable = $_POST['textareanamehere'];