<?php
ini_set('display_errors',1);
ini_set('display_startup_errors',1);
error_reporting(-1);
mysql_connect("localhost", "*******", "*******") or die("Connection Failed");
mysql_select_db("Naissance-passwords")or die("Connection Failed");
$id = '';
if(isset($_POST['id'])) $id = $_POST['id'];
$id = mysql_real_escape_string($id);
$query = "DELETE FROM system_passwords WHERE id='".$id."'";
if(mysql_query($query)){
}
else{
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="style.css"/>
<style>
label{display:inline-block;width:150px;margin-bottom:10px;} <!-- this is for the style of form -->
</style>
</head>
<body>
<!-- Nav bar and links -->
<div id="menu">
<a href="search.php">Search</a>
<a href="insert.php">Insert</a>
<a href="update.php">Update</a>
<a href="remove.php">Remove</a>
</div>
<form action="remove.php" method="post">
ID
<input name="id" type="text" style="
padding-top: 1px;
margin-top: 10px;
border-left-width: 2px;
margin-left: 50px;
">
<input name="Submit" type="submit" value="delete record" />
</form>
</body>
</html>
SO this will delete a row by id, but I do not want it to delete, I want to change it so that it looks for a column I am calling "Hide" which will have one of two numbers in it, either a 0 or a 1. If it is a 0 when I use the search function, I want it to show the result, and if it has a 1, then I want it to hide from the search rather than delete as this code will do.