Page redirection and data in the URL
Posted: Fri May 21, 2004 4:48 am
Hi all
I have developed a form validation script which works as:
1) User fills in the form and presses submit. The form is posted on the same page.
2) A validation script (validate()) executes for the whole form and checks each object for the validation rules specified during form creation.
3) If there is any error i the form the validate() displays the same form with error fields marked with *, otherwise the validate() redirects to the next page. The redirection works as follows:
foreach ($_REQUEST as $field => $fieldValue){
$fieldName = $field;
$fieldValue = $_REQUEST[$fieldName];
$tString = $tString . $fieldName. "=" .$fieldValue. "&";
}
$PageRed= $successPage."?". $tString;
header("Location: http://" . $_SERVER['HTTP_HOST']. dirname($_SERVER['PHP_SELF']). "/" . $PageRed);
exit();
Now I am having problems in the case when the form contains large data object e.g. Textarea. because there is a restriction that in the url we can send a specific length of data.
I would like to have something similar to "Server.execute or Server.Transfer" in ASP.
Can anyone help in this regard.
Regards
I have developed a form validation script which works as:
1) User fills in the form and presses submit. The form is posted on the same page.
2) A validation script (validate()) executes for the whole form and checks each object for the validation rules specified during form creation.
3) If there is any error i the form the validate() displays the same form with error fields marked with *, otherwise the validate() redirects to the next page. The redirection works as follows:
foreach ($_REQUEST as $field => $fieldValue){
$fieldName = $field;
$fieldValue = $_REQUEST[$fieldName];
$tString = $tString . $fieldName. "=" .$fieldValue. "&";
}
$PageRed= $successPage."?". $tString;
header("Location: http://" . $_SERVER['HTTP_HOST']. dirname($_SERVER['PHP_SELF']). "/" . $PageRed);
exit();
Now I am having problems in the case when the form contains large data object e.g. Textarea. because there is a restriction that in the url we can send a specific length of data.
I would like to have something similar to "Server.execute or Server.Transfer" in ASP.
Can anyone help in this regard.
Regards