Tom's Hardware > Forum > Applications > Internet Applications > Need help with php coding
Word :    Username :           
 

Here is the code,it is basically for my registration page and i want to add that uiser needs to accept my T & C before proceeding but something i am doing wrong, no matter if i add this code in php or in html format, see the bolded part of the code:

Quote :

<div class="users register-page">
<h1 class="page-title"><?php __('Register');?></h1>

<div class="col1">
<div class="form-block">
<div class="content">
<fieldset>
<legend></legend>
<?php echo $form->create('User', array('action' => 'register'));?>
<?php
echo $form->input('username', array('label' => 'Username *'));
echo $form->input('before_password', array('value' => '', 'type' => 'password', 'label' => 'Password *'));
echo $form->input('retype_password', array('value' => '', 'type' => 'password', 'label' => 'Retype Password *'));
echo $form->input('first_name', array('label' => 'First Name *'));
echo $form->input('last_name', array('label' => 'Last Name *'));
echo $form->input('email', array('label' => 'Email *'));
echo $form->input('date_of_birth', array('minYear' => $appConfigurations['Dob']['year_min'], 'maxYear' => $appConfigurations['Dob']['year_max'], 'label' => 'Date of Birth'));
echo $form->input('gender_id', array('type' => 'select', 'label' => 'Gender'));
echo $form->input('newsletter', array('label' => 'Sign up for the newsletter?'));
echo $form->input('referrer', array('label' => 'Referred By'));
?>
<div class="hint">Enter in the username or email address of something that referred you.

<form action="tc_yes.html" method="GET" onsubmit="return checkCheckBox(this)">
I accept: <input type="checkbox" value="0" name="agree">
<input type="submit" value="Continue">
<input type="button" value="Exit" onclick="document.location.href='index.html';">
</form>

</div>
<?php
echo $form->end('Register');
?>

</fieldset>

</div>
</div>
</div>

<div class="col2">
<h3 class="heading"><?php __('Already a Member?');?></h3>
<p><?php echo sprintf(__('If so you may want to %s now.', true), $html->link(__('login', true), array('action'=>'login')));?></p>

<h3><?php __('Forgotten Your Password?');?></h3>
<p><?php echo sprintf(__('Click here to %s.', true), $html->link(__('reset your password', true), array('action'=>'reset')));?>
</p>
</div>
</div>



and here is the <head> part of this small scipt:

Quote :

<script type="text/javascript">
<!--
function checkCheckBox(f){
if (f.agree.checked == false )
{
alert("Please tick the box to continue" );
return false;
}else
return true;
}
//-->
</script>



Any help? :sarcastic:

Sponsored Links
Register or log in to remove.
Tom's Hardware > Forum > Applications > Internet Applications > Need help with php coding
Go to:

There are 540 identified and unidentified users. To see the list of identified users, Click here.

Sponsored links
  • Ask the community now
  • Publish
Ad
They won a badge
Join us in greeting them