File: C:/xampp/htdocs/FograPC4/delete.php
<?php
session_start();
///include("functions.php");
$userid=$_SESSION["user_id"];
$username=$_SESSION["username"];
$company=$_SESSION["company"];
echo "Welcome! ".$company;
//error_reporting(0);
/*
All source code copyright and proprietary Melonfire, 2002. All content, brand names and trademarks copyright and proprietary Melonfire, 2002. All rights reserved. Copyright infringement is a violation of law.
This source code is provided with NO WARRANTY WHATSOEVER. It is produced and meant for illustrative purposes only, and is NOT recommended for use in production environments.
Read more articles like this one at http://www.melonfire.com/community/columns/trog/ and http://www.melonfire.com/
*/
// delete.php - delete a press release
?>
<html>
<head>
<basefont face="Verdana">
</head>
<body>
<!-- standard page header begins -->
<p> <p>
<table width="100%" cellspacing="0" cellpadding="5">
<tr>
<td></td>
</tr>
<tr>
<td bgcolor="Navy"><font size="-1" color="White"><b>>Plate management: Delete</b></font></td>
</tr>
</table>
<!-- standard page header ends -->
<p>
<?php
// includes
$id= $_GET['id'];
$host="localhost:";
$user="root";
$pass="fredsql";
$db="tvicheck-st";
date_default_timezone_set("Asis/Taipei");
$connection = mysql_connect($host, $user, $pass) or die ("Unable to connect!");
mysql_query("SET NAMES 'utf8'");
//$link = mssql_connect("MACBOOK7", "sa", "fred5697");
mysql_select_db($db) or die ("Unable to select database!");
//$query = "SELECT * from plate where company='$company' order by id desc ";}
//$query = "SELECT * from plate where company='$company' order by id desc ";}
$query = "DELETE from plate where id = '$id'";
//echo $query;
$result = mysql_query($query) or die ("Error in query: $query. " . mysql_error());
// close database connection
mysql_close($connection);
// print result
echo "<font size=-1>Deletion successful. <a href=Rank.php>Go back to the main menu</a>.</font>";
?>
<!-- standard page footer begins -->
<p>
<table width="100%" cellspacing="0" cellpadding="5">
</table>
<!-- standard page footer ends -->
</body>
</html>