Posted by larry on 01/05/08 22:34
This is very basic and only handles simple array inputs as well as
straight inputs (anything with named elements or multi-dimensional
array POSTs are not covered here), also there is no security measures
(code injection vulnerability?), etc. add validation as needed also
something at this end and the destination to ensure that the data came
from this script would also be a 'good thing'.
<HTML><HEAD>
<TITLE>Service has moved!</TITLE>
</HEAD>
</HTML>
<BODY>
<FORM method="POST" action="newpage.php">
<center>
<H2>Sorry the service has moved...</H2>
<?php
foreach( $_POST[] as $name => $content) {
if(!is_array($content) {
echo '<INPUT type="hidden" name="'.$name.'" value="'.
$content.'">';
}
} else {
foreach( $content as $element ) {
echo '<INPUT type="hidden" name="'.$name.'[]" value="'.
$element.'">';
}
}
?>
Redirecting to new site.<br />Please Click "contune" to go to the new
location =>
<INPUT type="submit" name="continue" value="contune">
</FORM>
</center>
</BODY>
</HTML>
Navigation:
[Reply to this message]
|