quote_delete.php
Gesponsorde koppelingen
PHP script bestanden
Code (php)
1
2
3
4
5
6
7
2
3
4
5
6
7
<?PHP
error_reporting(-1);
session_start();
if(!session_is_registered('gebruikersnaam')){
header("location:login.php");
}
?>
error_reporting(-1);
session_start();
if(!session_is_registered('gebruikersnaam')){
header("location:login.php");
}
?>
<HTML>
<HEAD>
<TITLE>Quote verwijderen</title>
</head>
<body>
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?PHP
error_reporting(-1);
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
if(!empty($_POST['id']))
{
$id=mysql_real_escape_string($_POST['id']);
$sql="DELETE FROM quotes WHERE id = ".$id."";
$result=mysql_query($sql);
echo "Het ID ".$id." is succesvol verwijderd";
}
else {
echo "U heeft geen ID ingevult.";
echo "<br /><a href=\"login_gelukt.php\">Klik hier om terug te gaan</a>";
}
?>
error_reporting(-1);
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
if(!empty($_POST['id']))
{
$id=mysql_real_escape_string($_POST['id']);
$sql="DELETE FROM quotes WHERE id = ".$id."";
$result=mysql_query($sql);
echo "Het ID ".$id." is succesvol verwijderd";
}
else {
echo "U heeft geen ID ingevult.";
echo "<br /><a href=\"login_gelukt.php\">Klik hier om terug te gaan</a>";
}
?>
</body>
</html>