Form action

From: Date: Mon, 11 Oct 2004 03:03:51 +0000
Subject: Form action
Groups: php.db 
Request: Send a blank email to php-db+get-36714@lists.php.net to get a copy of this message
Hi all, i'm designing a lot of forms and would like to know the standard practice. which of the following will be advisable? 1) form action is $PHP_SELF i.e. <form name="form01" action="<?=$PHP_SELF;?>" method="post"> i.e the script to check if the values submitted is valid and the scripts to insert the data into the database are all in the same php file with the form. 2) form action is another verification php file i.e. <form name="form01" action="verify_form.php" method="post"> i.e the script to check if the values submitted is valid and the scripts to insert the data into the database are in a different php file with the form. which of them is best?? i read before that the second option is preferred because if users click "back" on their browser, they will not resubmit the form again etc.. does anyone has a suggestion for me? thank you so much! regards, hwee

« previous php.db (#36714) next »