|
-
Aug 19th, 2005, 10:25 PM
#1
Thread Starter
Addicted Member
[RESOLVED]PHP retrieve textbox value
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?
Last edited by Osiris; Aug 20th, 2005 at 10:52 AM.
؊Ϯϊ
-
Aug 20th, 2005, 01:08 AM
#2
Hyperactive Member
Re: PHP retrieve textbox value
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...
-
Aug 20th, 2005, 01:08 AM
#3
Lively Member
Re: PHP retrieve textbox value
You can access it through the $_POST superglobal:
PHP Code:
echo $_POST['box'];
-
Aug 20th, 2005, 01:09 AM
#4
Hyperactive Member
Re: PHP retrieve textbox value
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
-
Aug 20th, 2005, 08:41 AM
#5
Thread Starter
Addicted Member
Re: PHP retrieve textbox value
 Originally Posted by ninjanutz
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...
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?
-
Aug 20th, 2005, 10:54 AM
#6
Thread Starter
Addicted Member
Re: [RESOLVED]PHP retrieve textbox value
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
-
Aug 20th, 2005, 03:45 PM
#7
Hyperactive Member
Re: [RESOLVED]PHP retrieve textbox value
yea i dun think its possible with a form
-
Aug 20th, 2005, 03:46 PM
#8
Hyperactive Member
Re: [RESOLVED]PHP retrieve textbox value
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|