RE: [PHP] Forms and PHP_SELF

From: Date: Thu, 10 May 2001 15:10:47 +0000
Subject: RE: [PHP] Forms and PHP_SELF
Groups: php.general 
Request: Send a blank email to php-general+get-52297@lists.php.net to get a copy of this message
surely all you need to do is put the php right at the top, and say if (isset($variable) { print this message } else {do this header (); } i've done that loads of times so the form data goes back to the page, and once its inserted into the db, it sends a header to redirect. /sunny -----Original Message----- From: Chad Guilette [mailto:cguilette@worldnet.att.net] Sent: 10 May 2001 16:07 To: php-general@lists.php.net Subject: [PHP] Forms and PHP_SELF I'm currently working on a project and I've come across a problem which I'm sure has been discussed several times before but I still need some assistance on it. I have a page with a form whose action is $PHP_SELF so the form and the form action are all in the same page....this works fine but in the form action a message is displayed stating success or failure of the insertion of data into a database and the user is redirected by means of a meta refersh....during this time if the user refreshes the page the data is resubmitted again....the user can do this repeatedly.... Some people have suggested that I use headers but I cannot do this at this point because I've already sent the header... others have suggested I use some variable $script_ran_count = 1 then run and after increment so a test of it would be false...this had no effect others have suggested javascript... I'm really baffled...how can I have a self-submitting form page that has a display message and a meta redirect but if the user refreshes the page stop the resumission of data? Regards, Chad Guilette -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#52297) next »