is there a way to retrieve a textbox value with PHP ?
for example...
<input type=textbox value=1 name="box">
is there a way to get the value of "box" into a PHP variable?
Printable View
is there a way to retrieve a textbox value with PHP ?
for example...
<input type=textbox value=1 name="box">
is there a way to get the value of "box" into a PHP variable?
yea in a php script type
<?php
echo $_POST['box'];
?>
this sends the value of "box" to ur web browser. in order to process the form to the way u want it u could either use conditionals, etc...
You can access it through the $_POST superglobal:
PHP Code:echo $_POST['box'];
in order to use $_POST the form method must be post u could also use form methof get and $_GET (get appends the information to the url and wen u call it it takes it straight from the url
But in order to do this you would need a form, a submit button and a change of url... what i was thinking of was getting the value of a textbox without changing the url and without having a form and without submitting anything. Is there a way?Quote:
Originally Posted by ninjanutz
I don't know if there is a way since the values are client side and php is server side, but I ended up putting everything in a form and submitting it via submit button...
thanks everyone
yea i dun think its possible with a form
without*