Re: Can I perform a PHP script from a form but stay on the same page afterwards?
| From: | Charles Fowler | Date: | Fri, 16 Aug 2002 00:31:17 +0000 |
| Subject: | Re: Can I perform a PHP script from a form but stay on the same page afterwards? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-112885@lists.php.net to get a copy of this message | ||
Check out Liz Fulgham article on PHP and Forms ->>
http://softwaredev.earthweb.com/script/article/0,,12063_996351,00.html
It show how the _SERVER fuction/varible is used.
Cheers CJ
Jim Dam wrote:
> http://www.faqts.com/knowledge_base/view.phtml/aid/235/fid/17
> ----- Original Message -----
> From: "php @ banana" <php@finalbanana.com>
> To: "PHP-GENERAL" <php-general@lists.php.net>
> Sent: Friday, August 09, 2002 5:51 PM
> Subject: Re: [PHP] Can I perform a PHP script from a form but stay on the
> same page afterwards?
>
> >You can send a 204 No Content header, and the browser won't move to the new
> >page, but instead the PHP script will be executed and the browser will stay
> >on the same page.
>
> could you gimmie a code snippet of the above
>
> Thanks
>
> R>
>
> >
> >Jim Dam
> >jim.dam@cogeco.ca
> >
> >
> >----- Original Message -----
> >From: "César Aracena" <icaam@icaam.com.ar>
> >To: "'DonPro'" <donpro@lclcan.com>; "'php
> >list'"
> <php-general@lists.php.net>
> >Sent: Friday, August 09, 2002 4:53 PM
> >Subject: RE: [PHP] Can I perform a PHP script from a form but stay on the
> >same page afterwards?
> >
> >
> >> > -----Original Message-----
> >> > From: DonPro [mailto:donpro@lclcan.com]
> >> > Sent: Friday, August 09, 2002 5:34 PM
> >> > To: php list
> >> > Subject: [PHP] Can I perform a PHP script from a form but stay on the
> >> same
> >> > page afterwards?
> >> >
> >> > Hi,
> >> >
> >> > I have a form where the user can change a value ion a text box and
> >> then
> >> > click on a button which will update a table in a MySQL database. I
> >> assume
> >> > that the only way to do this is to have the button POST the form value
> >> to
> >> > my
> >> > script which updates the MySQL table.
> >> >
> >> > However, once updated (whether the update is successfull or not), I
> >> need
> >> > to
> >> > remain or return to the same page that the form is on.
> >> >
> >> > Can this easily be done?
> >> >
> >> >
> >> [Cesar Aracena]
> >>
> >> Sure. All you have to do is point the form's action to $PHP_SELF and the
> >> play a little with the *IF* and *ELSE IF* statements.
> >>
> >> >
> >> > --
> >> > PHP General Mailing List (http://www.php.net/)
> >> > To unsubscribe, visit: a™
> >> > sbP‡–p>ß6p5Àhttp://www.php.net/unsub.php
> >>
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> ________________________--__-______-______________
> eat pasta
> type fasta
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php