hello all

I am trying to customize a shopping cart.  I need to inject a page in
the checkout process that must be checked (terms and conditions), before
continuing.

I have it working halfway.  In checkout_payment.php I have an if stmt

*************************************************************************

//if terms and conditions hasnt been checked redirect to conditions.php
  if ($HTTP_POST_VARS['agree'] != 'true')       {
   tep_redirect(tep_href_link(FILENAME_CONDITIONS, '', 'SSL'));
  }

*************************************************************************

So - if you go to checkout_payment and that box hasnt been checked it'll
send you to conditions.php.  If you go to conidtions.php and dont check
the box - the page keeps reloading, which is ok for now.

In conditions.php I have

*************************************************************************

<form name="conditions" action = checkout_payment.php method="post">
      <tr><td><?php echo tep_draw_checkbox_field('agree','true');?>Check
this box to accept Terms and Conditions</td>
        <td align="right" class="main"><br>
<input type= "submit" value = "continue"></td></tr>
</form>

*************************************************************************

If the box is checked it goes to checkout_payment.php Ok, but when you
click continue from checkout_payment it goes back to conditions.php like
the variable has been reset to false. (I think) Essentially because the
script is running again I guess.

Should I try to set this var in the session ? Or do a simple javascript
validation in conditions.php ???

Any suggestions greatly appreciated.


-- 
Mignon Hunter
Web Master and Developer
Toshiba International
713.466.0277 x 3461


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to