i have this form in html:
<form id="form_269808" class="appnitro" method="post" action="">
<div class="form_description">
<h2>Basic Information</h2>
<p>Please fill up your information correctly. All fields are required</p>
</div>
<ul >
<li id="li_1" >
<label class="description" for="element_1">First Name </label>
<div>
<input id="element_1" name="element_1" class="element text medium" type="text" maxlength="255" value=""/>
</div><p class="guidelines" id="guide_1"><small>Enter your first name</small></p>
</li> <li id="li_2" >
<label class="description" for="element_2">Last Name </label>
<div>
<input id="element_2" name="element_2" class="element text medium" type="text" maxlength="255" value=""/>
</div><p class="guidelines" id="guide_2"><small>Enter your last name</small></p>
</li> <li id="li_3" >
<label class="description" for="element_3">Middle Name </label>
<div>
<input id="element_3" name="element_3" class="element text medium" type="text" maxlength="255" value=""/>
</div><p class="guidelines" id="guide_3"><small>Enter your middle name</small></p>
</li> <li id="li_5" >
<label class="description" for="element_5">Address </label>
<div>
<input id="element_5" name="element_5" class="element text medium" type="text" maxlength="255" value=""/>
</div><p class="guidelines" id="guide_5"><small>Enter your complete address</small></p>
</li> <li id="li_6" >
<label class="description" for="element_6">Email </label>
<div>
<input id="element_6" name="element_6" class="element text medium" type="text" maxlength="255" value=""/>
</div><p class="guidelines" id="guide_6"><small>Enter your valid email address</small></p>
</li> <li id="li_8" >
<label class="description" for="element_8">Major </label>
<div>
<select class="element select medium" id="element_8" name="element_8">
<option value="" selected="selected"></option>
<option value="1" >BS Architecture</option>
<option value="2" >BS Computer Engineering</option>
<option value="3" >BS Civil Engineering</option>
<option value="4" >BS Electrical Engineering</option>
<option value="5" >BS Mechanical Engineering</option>
</select>
</div><p class="guidelines" id="guide_8"><small>Please choose your enrolled major</small></p>
</li> <li id="li_7" >
<label class="description" for="element_7">Date of Birth </label>
<span>
<input id="element_7_1" name="element_7_1" class="element text" size="2" maxlength="2" value="" type="text"> /
<label for="element_7_1">MM</label>
</span>
<span>
<input id="element_7_2" name="element_7_2" class="element text" size="2" maxlength="2" value="" type="text"> /
<label for="element_7_2">DD</label>
</span>
<span>
<input id="element_7_3" name="element_7_3" class="element text" size="4" maxlength="4" value="" type="text">
<label for="element_7_3">YYYY</label>
</span>
<span id="calendar_7">
<img id="cal_img_7" class="datepicker" src="calendar.gif" alt="Pick a date.">
</span>
<script type="text/javascript">
Calendar.setup({
inputField : "element_7_3",
baseField : "element_7",
displayArea : "calendar_7",
button : "cal_img_7",
ifFormat : "%B %e, %Y",
onSelect : selectDate
});
</script>
<p class="guidelines" id="guide_7"><small>Enter your date of birth</small></p>
</li> <li id="li_9" >
<label class="description" for="element_9">Gender </label>
<span>
<input id="element_9_1" name="element_9" class="element radio" type="radio" value="1" />
<label class="choice" for="element_9_1">Male</label>
<input id="element_9_2" name="element_9" class="element radio" type="radio" value="2" />
<label class="choice" for="element_9_2">Female</label>
</span><p class="guidelines" id="guide_9"><small>Please select your gender</small></p>
</li>
<li class="buttons">
<input type="hidden" name="form_id" value="269808" />
<input id="saveForm" class="button_text" type="submit" name="submit" value="Submit" />
</li>
</ul>
</form>
DATABASE:
id firstname lastname middlename address gender major date_of_birth
1 asdfa dsfd jhfhf jjfd g hgshfd 1-12-95
... ... ... ... ... ... ... ...
How do i code in php if i want to compare if the text inputted in the field is the same in all the fields in the information in the database?