Professional Documents
Culture Documents
Process
Process
Process
php
if (isset($_POST['registerbtn']))
{
$fname = $_POST['fname'];
$mname = $_POST['mname'];
$lname = $_POST['lname'];
$gender = $_POST['gender'];
$contactno = $_POST['contactno'];
$job = $_POST['job'];
}
else{
if (isset($_GET['delete']))
{
$id = $_GET['delete'];
$mysqli->query("DELETE FROM webtb WHERE idno = $id ") or die ($mysqli->error());
header ("Location: web.php");
exit;
}
if (isset($_GET['edit']))
{
$id = $_GET['edit'];
$result = $mysqli->query("SELECT * FROM webtb WHERE idno = $id ") or die
($mysqli->error());
if (count($result) == 1)
{
$row = $result->fetch_array();
$fname = $row['firstname'];
$mname = $row['middlename'];
$lname = $row['lastname'];
$gender = $row['gender'];
$contactno = $row['contactnum'];
$job = $row['job'];
}
header ("Location: web.php");
}
?>