Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 7th, 2012  |  syntax: None  |  size: 1.08 KB  |  hits: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. $pretty_list = '<ul>';
  3. $fields = '<p>';
  4. foreach($_POST as $key => $val){
  5.   if($key != 'submit'){
  6.     $pretty_list .= '<li>' . htmlentities(ucwords(str_replace('_',' ',$key))) . ': ' . htmlentities($val) . '</li>';
  7.     $fields .= '<input type="hidden" name="' . $key . '" value="' . $val . '"/>';
  8.   }
  9. }
  10. $pretty_list .= '</ul>';
  11. $fields .= '</p>';
  12. ?>
  13. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  14.   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  15.  
  16. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  17. <head>
  18.   <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  19.  
  20.   <title>Confirmation Page</title>
  21.  
  22. </head>
  23.  
  24. <body>
  25. <form action="your_real_handler.php" method="post" accept-charset="utf-8">
  26.   <?=$fields?>
  27.   <h1>Confirm your entries</h1>
  28.   <p>Please review the following information before pressing Continue.</p>
  29.   <?=$pretty_list?>
  30.   <p>
  31.     <a href="javascript:history.go(-1);" title="Go back">Ooops! I need to fix something!</a>
  32.     <input type="submit" value="Continue &rarr;"/>
  33.   </p>
  34. </form>
  35.  
  36. </body>
  37. </html>