[thelist] redirecting a post in php (or asp)

deboute benjamin deboute at fr.clara.net
Fri Aug 18 13:47:43 CDT 2000


At 13:13 18/08/00 -0500, you wrote:
>I am doing some form processing. I want the user to fill
>some fields in page1.php and have the form post the data
>to page1.php to check if its correct. If they are not correct, 
>it fills the fields that we just received so that they can be edited.
>
>If they are correct, it (somehow, i dont know if its possible)
>posts the data to page2.php as if it were coming from the form.
>
>Can this be done ? thanks in advance!

the thing's like that

<?
$not_good="0";
if(check1) { $not_good="1"; }
if(check2) { $not_good="1"; }

if($not_good==="1") {
?>
<html>
<body>
<form action="<?=$PHP_SELF">
<input type="text" name="foo" value="<? if(isset($foo) && $foo !='') { echo $foo; }?>">
...................
<?
else { include("page2.php") }
?>
or 
<?
else { code }
?>
or
<?
else { header("$SERVER_PROTOCOL url_of_page2_with_the_query_from_page1"); }
?>






More information about the thelist mailing list