<?php
$dbc=mysqli_connect('localhost','root','','nog') or die('Not Connected');
$query="select * from registration";
$result=mysqli_query($dbc,$query) or die('Not Connect');
if ($result) {
// create a new form and then put the results
// indto a table.
echo "<html>
<body>";
echo "<form method='post' action='approve.php'>";
echo "<table cellspacing='0' cellpadding='15'>
<th width='15%'>User Id</th>
<th width='55%'>Name</th>
<th width='15%'>Age</th>
<th width='15%'>Blood Group</th>
<th width='15%'>Sex</th>
<th width='15%'>Qualification</th>
<th width='15%'>E-Mail</th>
<th width='15%'>Address</th>
<th width='15%'>About Yourself</th>
<th width='15%'>Status</th>
";
while ($row = $result->fetch_object()) {
$UserId = $row->UserId;
$Name = $row->Name;
$Age = $row->Age;
$BloodGroup= $row->BloodGroup;
$Sex = $row->Sex;
$Qualification = $row->Qualification;
$Email = $row->Email;
$Address = $row->Address;
$AboutYourself = $row->AboutYourself;
$Status = $row->Flag;
//put each record into a new table row with a checkbox
echo "<tr>
<td>$UserId</td><td>$Name</td><td>$Age</td><td>$BloodGroup</td><td>$Sex</td><td>$Qualification</td><td>$Email</td><td>$Address</td><td>$AboutYourself</td><td>$Status</td>
<td><input type='checkbox' name='checkbox[]' id='checkbox[]' value=$UserId /></td>
</tr>";
}
// when the loop is complete, close off the list.
echo "</table><p><input type='submit' class='button' name='Approve' value='Approve'/></p>";
//echo "<a href='reject.php'><input type='submit' value='Reject' name='register'/></a>";
echo "</html>
</body>";
}
?>
I want to add a "Reject Button on this form which redirect to "reject.php".
But I don't know how I do it.......
Anyone plz help me....