Free Web Hosting Forum
Go Back   Free Web Hosting Forum > Website Building > Web Programming
Reload this Page Add A Check Box For Terms & Conditions
Reply
 
Thread Tools Display Modes
(#1 (permalink))
Old
Junior Member
JamesIsDusk is on a distinguished road
 
Posts: 20
Join Date: Jun 2012
Default Add A Check Box For Terms & Conditions - 08-17-2012, 05:26 PM

I want to add a required check box to my sign up form for terms & conditions. Can someone help me out?

My Code:

HTML Code:
function user_signup() {
  global $db_prefix;
?>

<div align="center">
<h1>Sign Up</h1>
<form action="signup.php" method="post">
<table width="100%">
<tr>
  <td width="10%">  </td>
  <td width="30%" valign="top" align="right">
   Username:<br>  </td>
  <td align="left">
   <input type="text" name="username" size="30" <?php if (isset($_POST['username'])) echo "value=\"" . $_POST['username'] . "\"" ?>>  </td>
</tr>
<tr>
  <td width="10%">  </td>
  <td width="30%" valign="top" align="right">
   Name:<br>  </td>
  <td align="left">
   <input type="text" name="name" size="30" <?php if (isset($_POST['name'])) echo "value=\"" . $_POST['name'] . "\"" ?>>  </td>
</tr>
<tr>
  <td width="10%">  </td>
  <td width="30%" valign="top" align="right">
   Password:<br>  </td>
  <td align="left">
   <input type="password" name="password" size="30">  </td>
</tr>
<tr>
  <td width="10%">  </td>
  <td width="30%" valign="top" align="right">
   Confirm Password:<br>  </td>
  <td align="left">
   <input type="password" name="password2" size="30">  </td>
</tr>
<tr>
  <td width="10%">  </td>
  <td width="30%" valign="top" align="right">
   E-mail:<br>  </td>
  <td align="left">
   <input type="text" name="email" size="30" <?php if (isset($_POST['email'])) echo "value=\"" . $_POST['email'] . "\"" ?>>  </td>
</tr>
<tr>
  <td width="10%">  </td>
  <td width="30%" valign="top" align="right">
   Paypal:<br>  </td>
  <td align="left">
   <input type="text" name="paypal" size="30" <?php if (isset($_POST['paypal'])) echo "value=\"" . $_POST['paypal'] . "\"" ?>>  </td>
</tr>
<tr>
  <td width="10%">  </td>
  <td width="30%" valign="top" align="right">Date of Birth: <br>  </td>
  <td  align="left">
  <select name="month">
  <?php
    for ($i = 1; $i < 13; $i++) {
      ?>
      <option value="<?php echo $i ?>"><?php echo $i ?>
      <?php
    }
  ?>
  </select> 
  / 
  <select name="day">
    <?php
    for ($i = 1; $i < 32; $i++) {
      ?>
    <option value="<?php echo $i ?>"><?php echo $i ?>
    <?php
    }
  ?>
    </option>
  </select>
/  
<select name="year">
    <?php
    for ($i = 1900; $i < (date("Y",time()) ); $i++) {
      ?>
    <option value="<?php echo $i ?>"><?php echo $i ?>
    <?php
    }
  ?>
    </option>
  </select>
(Month/Day/Year) </td>
</tr>
</table>
<?php
   $r = my_query("select * from " . $db_prefix . "image_verifications where pagename='sign up' and status='y'");
   if (mysql_num_rows($r)) {
?>
 <table width="100%">
 <tr>
 <td width="10%">  </td>
  <td width="30%" align="right" valign="top">
   Enter the number exactly how you see it.<br>
  </td>
  <td valign="top" width="46">
   <input type="text" name="checker" size="6">
  </td>
  <td width="672" align="left" valign="top">
   <img src="jpeg.php" border="0" style="border:#000000; border-style:solid; border-width:1px">  </td>
 </tr>
 </table>
<?php
  }
?>
<br>
<input type="submit" value="  Submit  ">
</form>
I'm wanting to put it at the very end right after the verification code and above the submit button.
Reply With Quote
Sponsored Links
(#2 (permalink))
Old
Senior Member
grace1004 is on a distinguished road
 
Posts: 733
Join Date: Dec 2010
Default 08-18-2012, 01:57 AM

checkbox is used for multiple choice. For single choice, I recommend to use radio button.
Please put the following code just before submit button:

Code:
<textarea name="member" cols="80" rows="15">
Enter here terms and conditions
.
.
.
.
.
.
</textarea><br>
<table>
<tr>
<td width= "550" align="right">
<input type="radio" name="terms" value="yes">Agree
<input type="radio" name="terms" value="no">Do not agree
</td>
</tr>
</table><br>

Last edited by grace1004; 08-18-2012 at 02:40 AM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.5.2
vBulletin Skin developed by: vBStyles.com