Hi,
I have a button in my form which is supposed to retrieve data from the database and post it. The problem is when I click on the button, nothing happens and I don't get any error messages either.
this is the html code for the form
<tr><td class='bold_centre'>Personal Info:</td><td class='bold_centre'>First Name</td>
<td><input type='text' name='ffirstname13' value='$ffirstname13'
size='20' maxsize='20'></td>
<td class='bold_centre'>Last Name</td>
<td><input type='text' name='flastname13' value='$flastname13'
size='20' maxsize='20'></td></tr>
<td style='text-align: center' colspan='2'>
<br /><input type='submit' name='find1'
value='Find Personal Info'></td>
if($_POST['find1']== "Find Personal Info")
{
$query="SELECT * FROM personalinfo WHERE firstname= '$_POST[ffirstname13]' AND lastname='$_POST[flastname13]'";
$result=mysqli_query($cxn,$query)
or die ("Couldn't execute query.".mysqli_error($cxn));
print_r($query);
while($row=mysqli_fetch_assoc($result))
{
extract($row);
echo "Personal Info Found";
echo "<table width='100%' border='0'><tr><td class='bold_centre'>First Name</td>
<td><input type='text' name='firstname' value='$_POST[firstname]'
size='20' maxsize='20'></td>";
echo "<td class='bold_centre'>Last Name</td>
<td><input type='text' name='lastname' value='$_POST[lastname]'
size='20' maxsize='20'></td>";
echo "<td class='bold_centre'>Date of Birth</td>
<td><input type='text' name='BirthDate' value='$_POST[birthday]'
size='20' maxsize='20'></td>";
echo "<td class='bold_centre'>Sex</td>
<td><input type='text' name='Sex' value='$_POST[sex]'
size='20' maxsize='20'></td></tr>";
echo "<tr><td class='bold_centre'>Contract Status</td>
<td><input type='text' name='contract' value='$_POST[contract]'
size='20' maxsize='20'></td>";
echo "<td class='bold_centre'>Marital Status</td>
<td><input type='text' name='maritalstatus' value='$_POST[maritalstatus]'
size='20' maxsize='20'></td></tr>";
echo "<td class='bold_centre'>Job Title</td>
<td><input type='text' name='jobtitle' value='$_POST[jobtitle}'
size='20' maxsize='20'></td></tr>";
echo "<td class='bold_centre'>Job Category</td>
<td><input type='text' name='jobcategory' value='$_POST[jobcategory]'
size='20' maxsize='20'></td></tr>";
echo "<tr><td class='bold_centre'>Start Date</td>
<td><input type='text' name='startdate' value='$_POST[startdate]'
size='20' maxsize='20'></td>";
echo "<td class='bold_centre'>Probation End Date</td>
<td><input type='text' name='probationdate' value='$_POST[probationdate]'
size='20' maxsize='20'></td>";
echo "<td class='bold_centre'>End Date</td>
<td><input type='text' name='enddate' value='$_POST[enddate]'
size='20' maxsize='20'></td></tr>";
}
}
I am not sure what is wrong. But nothing inside the if statement works.
Thank you