Forum Moderators: open

Message Too Old, No Replies

questions about get and post

php get post

         

ksugam

7:31 pm on Feb 5, 2008 (gmt 0)

10+ Year Member



Hello,
I have done a GET and POST on the same page using the following code:

<form method="GET" action="<?php echo $_SERVER['PHP_SELF'];?>">
<input type='text' name='month' />
<input type="submit" name="Go" value="Go"><br>
</form>

The problem i have is, i dont want the submit button....I just want the textbox.....

So when the user enters the text in the textbox and hits enter, the GET/POST request should be submitted...is this possible?

If yes, the next thing i want is the text box to display tht input, not empty it......coz once the request is made, the textbox is blank

Any help will be appreciated

Thanks!

eelixduppy

8:15 pm on Feb 5, 2008 (gmt 0)



This can actually be done quite nicely with an AJAX implementation. For a very good example of how to use this with PHP, refer to the following links: [news.php.net...]
[w3schools.com...]