Hi guys,
I have set up a PHP form for a competition, for users to enter and all information to be stored in a database. I used the following NetTut+ tutorial to do so: http://tr.im/SwAd.
I've got the form submitting to the database as required, but with so many additional questions being asked, I would like to split the form into two separate sections. Obviously the first page would say continue to the next step before the second step allowing for the form to be submitted to the database.
The content that the user sees should be split, but should all be a part of the same form. Step 1 > Step 2 before submission.
Would anyone know of or recommend any methods to do this?
I'm a beginner so please be nice. :)
Cheers,
Daniel
I've attached the code below.
<form method="post" action="">
<fieldset>
<ul>
<li>
<label for="code">Entry Code On-Pack</label>
<input type="text" name="code" />
</li>
<li>
<label for="name">Name</label>
<input type="text" name="name" />
</li>
<li>
<label for="email">Email</label>
<input type="text" name="email" />
</li>
<li>
<label for="addressone">Address</label>
<input type="text" name="addressone" />
</li>
<li>
<label for="addressone"> </label>
<input type="text" name="addresstwo" />
</li>
<li>
<label for="addressone"> </label>
<input type="text" name="addressthree" />
</li>
<li>
<label for="telephone">Telephone</label>
<input type="text" name="telephone" />
</li>
<li>
<label for="dob">Date of Birth</label>
<input name="dob" type="text" value="[dd/mm/yy]" />
</li>
<li>
<label for="q1">Where have you seen Cookstown advertised?</label><br />
<input type="checkbox" name="q1cb1" /><label for="q1cb1">Magazines</label><br />
<input type="checkbox" name="q1cb2" /><label for="q1cb2">Billboards</label><br />
<input type="checkbox" name="q1cb3" /><label for="q1cb3">Television</label><br />
<input type="checkbox" name="q1cb4" /><label for="q1cb4">Radio</label><br />
<input type="checkbox" name="q1cb5" /><label for="q1cb5">Online</label><br />
<input type="checkbox" name="q1cb6" /><label for="q1cb6">Public Transport</label><br />
<input type="checkbox" name="q1cb7" /><label for="q1cb7">Bus Stops</label><br />
</li>
<li>
<label for="q2">How well do you remember those advertisments?</label><br />
<input type="radio" name="q2" value="VeryWell"/><label for="q1cb1">Very well</label><br />
<input type="radio" name="q2" value="FairlyWell"/><label for="q1cb2">Fairly well</label><br />
<input type="radio" name="q2" value="FewDetails"/><label for="q1cb3">A few details</label><br />
<input type="radio" name="q2" value="NotAtAll"/><label for="q1cb4">Not at all</label><br />
</li>
<label for="tc">Do you accept the terms and conditions</label>
<input type="checkbox" name="tc" class="styled" />
</li>
<li> </li>
<li>
<input type="submit" value="Enter Competition" class="large blue button" name="signup" />
</li>
</ul>
</fieldset>
</form>