RE: resubmit form after validation error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

You can use a variable to that. Like following. Example if the variable is 1
you start to processing form input.

Example 

<form method="post" action="file.php?action=1>

And in file.php you check the action variable if it is 1 you can start the
processing data.

If($_GET['action']==1) {
 Echo "done";
}

Thanks.
Caner.


-----Original Message-----
From: PJ [mailto:af.gourmet@xxxxxxxxxxxx] 
Sent: 20 June 2009 22:55
To: php-general@xxxxxxxxxxxxx
Subject:  resubmit form after validation error

I'm having a bit of a time figuring out how to resubmit a form after
obligatory field missing error.
The problem is that the page is accessed from a search page href where
the uri is like = file.php$=123.
Since the method="post" action="file.php?=<?php echo $number; ?> does
not work nor does PHP_SELF, I have set the action="otherfile.php". All
is well, if all fields are properly entered, but if there is an error,
how to resubmit the form for correction and resubmission without using
js or functions or redoing it all from scratch?

-- 
Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."
-------------------------------------------------------------
Phil Jourdan --- pj@xxxxxxxxxxxxx
   http://www.ptahhotep.com
   http://www.chiccantine.com/andypantry.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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux