Forum Moderators: coopster

Message Too Old, No Replies

Refresh command

         

smartcard

8:18 pm on Jun 24, 2005 (gmt 0)

10+ Year Member



I have a PHP script where after clicking GO, I need the page to refresh.

My GO command line is :


<td><input type="submit" name="<? echo "$option";?>"
value="go" class="entry"></td>

Please suggest me...

jatar_k

8:26 pm on Jun 24, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



when you click submit it will submit to whatever is the action set for the form

you have 2 choices, posting the data to the same page (a personal pet peeve of mine) or you can submit it and redisplay the data on the next page

Burner

8:31 pm on Jun 24, 2005 (gmt 0)

10+ Year Member



You handle it above where you declare your form, use something like:

<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post">

This will tell the page to reload itself no matter what it's called when you click submit and then you test for your name variable or you can:


<form action="<YOUR DESTINATION PAGE>" method="post">

and redisplay the data posted to your destination page from your name variable.

Burner