• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 321
  • Last Modified:

Nedd customer to check box before proceeding

Need to ensure that the IAgree button is checked before customer can proceed to the next step.
Thank you
<div class="name">
		<h4>Order Comments:</h4>
    <div class="details-text">
   	  <p class="eC_OrderInfo"><td><textarea name="OrderComments" id="OrderComments" cols="80" rows="6"><?php echo((isset($_POST["OrderComments"]))?$_POST["OrderComments"]:"") ?></textarea></td></p>
      <p class="eC_OrderInfo"><br />
      <?php
	  if (isset($_GET['terms']))  {
		  ?>
        	  <span style="color:red">You must accept the terms to continue.</span>
              <?php
	  }
	  ?><br />
        	  <input <?php if (!(strcmp(((isset($_POST["IAccept"]))?$_POST["IAccept"]:""),1))) {echo "checked=\"checked\"";} ?> name="IAccept" type="checkbox" id="IAccept" value="yes" />
       	    By Checking this box you give your digital signature that 
You agree with the <a href="/~ps4/page.php?Footer Pages=3">Terms of Sale </a></p>
      <p class="eC_OrderInfo">We do not sell, trade, or rent your personal information to others.</p>
      <p class="eC_OrderInfo"> <a href="/~ps4/page.php?Footer Pages=4">Our Online Privacy Policy</a> continues our   commitment to       serve   you and to protect your privacy online.</p>
      <p style="color:red"> Please refer to <a href="/~ps4/page.php?Footer_Pages_2=4">Shipping Rates </a>for approximate freight costs. </p>
      <p class="eC_OrderInfo"><span style="color:red">Please note: We ensure the best possible shipping rates for all of our customers. </span></p>
    </div>
        <div class="separator">&nbsp;</div>
      </div>

Open in new window

0
glozinski
Asked:
glozinski
  • 2
3 Solutions
 
speak2abCommented:
check to see that php code you have is in the Submit button e.g

if (isset($_POST['Submit1'])) {

}

Inside of this code, you can now we have another isset( ) function:

if (isset($_GET['terms'])) {

}

This time, we're checking to see if a checkbox was set.
0
 
speak2abCommented:
U might want to use $_POST.

You can also use javascripts to do this see an example here: http://www.plus2net.com/javascript_tutorial/valid-checkbox.php
0
 
Jason C. LevineNo oneCommented:
You can also highlight the checkbox in Design View, then switch to the Spry tab and select "Spry Checkbox Validation" to add some JavaScript that will not submit the form unless the checkbox is checked.  
0
 
glozinskiAuthor Commented:
jason1178 was the one easiest for me to implement
thank you all for assisting....
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now