
Untitled
By: a guest on
May 7th, 2012 | syntax:
None | size: 1.08 KB | hits: 17 | expires: Never
<?php
$pretty_list = '<ul>';
$fields = '<p>';
foreach($_POST as $key => $val){
if($key != 'submit'){
$pretty_list .= '<li>' . htmlentities(ucwords(str_replace('_',' ',$key))) . ': ' . htmlentities($val) . '</li>';
$fields .= '<input type="hidden" name="' . $key . '" value="' . $val . '"/>';
}
}
$pretty_list .= '</ul>';
$fields .= '</p>';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Confirmation Page</title>
</head>
<body>
<form action="your_real_handler.php" method="post" accept-charset="utf-8">
<?=$fields?>
<h1>Confirm your entries</h1>
<p>Please review the following information before pressing Continue.</p>
<?=$pretty_list?>
<p>
<a href="javascript:history.go(-1);" title="Go back">Ooops! I need to fix something!</a>
<input type="submit" value="Continue →"/>
</p>
</form>
</body>
</html>