Jump to content

Archived

This topic is now archived and is closed to further replies.

shan_cool

Getting value of a form object

Recommended Posts

Hi all,

I want to get a value of a text box in a same form.
how can i do it?

can anybody help me?
Thanks,
Shan

Share this post


Link to post
Share on other sites
[!--quoteo(post=349799:date=Feb 27 2006, 06:44 AM:name=shan_cool)--][div class=\'quotetop\']QUOTE(shan_cool @ Feb 27 2006, 06:44 AM) [snapback]349799[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Hi all,

I want to get a value of a text box in a same form.
how can i do it?

can anybody help me?
Thanks,
Shan
[/quote]

$_POST['text box name here'];

Share this post


Link to post
Share on other sites
[!--quoteo(post=350145:date=Feb 28 2006, 12:20 AM:name=shan_cool)--][div class=\'quotetop\']QUOTE(shan_cool @ Feb 28 2006, 12:20 AM) [snapback]350145[/snapback][/div][div class=\'quotemain\'][!--quotec--]
hi,
Thanks for ur reply,It does not work.

shan
[/quote]

What are you trying to do with it? You have to press submit for PHP to get involved.

Assume the filename is "thisfile.php".
[code]
<?php
$name = $_POST['name'];
print $name;
?>
<form action="thisfile.php" method="post"><input name="name"><input type="submit"></form>
[/code]

This will print what ever you put in the field after you submit it. The page does have to reload.

Share this post


Link to post
Share on other sites
Hi,

Thanks for ur reply,here i am not pressing any button,I just want to get the value of the text box which is used in a select query..

Thanks in advance,
shan

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.