2 Replies Latest reply on Aug 1, 2010 1:16 PM by BigG2009

    Back to front Form

    BigG2009 Level 1

      Hi There


      I am fairly new to PHP and have picked up a small project to make alterations to a Order Form.  The site can be found at http://www.brighton-company-formations.co.uk/ordering.php


      The problem exists when I get to step 5 in the process - if you wnt to get this far you need to put some dummy text in the form to allow you to progress to this stage.


      I have attached the code for the page below and would appreciate some assistance from anyone that might be able to help.


      Thanks in advance






      <?php  include 'calculate-amount.php'; ?>




      <form action="" method="post">


        Please review the details below and make your payment securely online if the details are correct.





          The total order amount is: £<?php echo number_format((calculate_amount()/100.0), 2); ?> including VAT.


        This is calculated from your chosen package, postage method, whether you are using our

        service address facility and any extra copies of articles of association you have added.




        Please press the Back button below if you need to make any changes.



              <legend>Your order details</legend>



          $excludes = array('Next','Next X','Next Y','stage1','stage2','stage3','stage4','stage5','cd_in_eea','shipping_address_same_as_reg istered_address','billing_address_same_as_registered_address');

          foreach ($_POST as $key=>$value){

              $label = ucwords(str_replace('_',' ',$key));

              $val = ucwords(str_replace('_',' ',$value));

            echo !in_array($key,$excludes)&&!empty($value)&& strpos($label,'Selectaddress') === FALSE?"<li>$label: $val</li>":'';





                      <input name="Back" type="submit"  class="cancel"   value="Back" align="left" width="54" height="20" border="0" />

                      <input name="Next" type="submit"   value="Next" align="left" />

              <input type="hidden" name="stage5" value="1" />

              <?php foreach($_POST as $name => $value) { if(!empty($value)) echo "<input type=\"hidden\" name=\"$name\" value=\"$value\" />" ;} ?>