Web form not working

Anonymous
timer Asked: Jul 1st, 2013
account_balance_wallet $5

Question Description

I would like my signup form to require my users to complete all the fields and even though I have inputted that feature it is not working and I would love to know why. here is the current code:

PHP Code:

<form action="register.php" method="post">
 <div class="row">
 <label>Username:</label>
 <div class="right"><input type="text" value="" name="username" class="{validate:{required:true, messages:{required:'Please enter your username'}}}" /></div>
 </div>
 <div class="row">
 <label>Account Email:</label>
 <div class="right"><input type="text" value="" name="email" class="{validate:{required:true, email:true, messages:{required:'Please enter your email address'}}}" /></div>
 </div>
 <div class="row">
 <label>Account Password:</label>
 <div class="right"><input type="password" value="" name="password" class="{validate:{required:true, messages:{required:'Please enter your password'}}}" /></div>
 </div>
<br />
<div class="title">Contact Details:</div>
 <div class="row">
 <div class="right">
 <?php echo $users->getCountrySelectBox($row['country_iso']);?>  </div></div>
 <div class="row">
 <label>Your Name:</label>
 <div class="right"><input type="text" value="" name="name" class="{validate:{required:true, messages:{required:'Please enter your real name'}}}" /></div>
 </div>
 <div class="row">
 <label>Street Address:</label>
 <div class="right"><input type="text" value="" name="address" class="{validate:{required:true, messages:{required:'Please enter your address'}}}" /></div>
 </div>
 <div class="row">
 <label>City/Town:</label>
 <div class="right"><input type="text" value="" name="city" class="{validate:{required:true, messages:{required:'Please enter your city'}}}" /></div>
 </div>
 <div class="row">
 <label>Zip/Postal Code:</label>
 <div class="right"><input type="text" value="" name="zip" class="{validate:{required:true, messages:{required:'Please enter your zip code'}}}" /></div>
 </div>
 <br />
 <div class="title">Content & Promotional Methods:</div>
<div class="row">
text...text
 </div><div class="row">
 <center><h6>Minimum 40 characters required.</h6><textarea value="" name="methods" class="{validate:{required:true, messages:{required:'Please enter your Content Type and your Promotional Methods'}}} " style="height : 100px; width : 600px;" > </textarea> </div></center>
 <?php if(isset($_GET['ref'])){?>  <div class="row">
<label>Referral</label>
 <div class="ref">
 <div class="right"><input type="text" value="<?php echo $_GET['ref']; ?>" name="referral" disabled="" /></div>
 </div>
 </div>
 <?php } ?>  <div class="row">
 <label>Agreement:</label>
 <div class="right">
 <input type="checkbox" name="agreement" id="agreement"/>
 <label for="agreement">I have read and accept the hidden <a href="tos.php" target="_blank" >Terms of Service</a></label>
 </div>
 </div>
 <div class="row">
 <div class="right">
 <button name="submit" id="submit" type="submit" class="green"><span>Submit</span></button>
 </div>
 </div>
 </form>
 </div>

It is currently just letting users to signup without completing all the fields. If anyone could help me with this, that would be wonderful.

Thank you

Tutor Answer

Farrukh
School: Boston College

<br />
<b>Parse error</b>: syntax error, unexpected '&lt;' in <b>[...][...]</b> on line <b>1</b><br />

flag Report DMCA
Review

Anonymous
awesome work thanks

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors