MSV FM

dot.antimicrobial@66.96.161.157: ~ $
Path : /hermes/sb_web/b744/limousinebustoronto.com/admin/
File Upload :
Current < : /hermes/sb_web/b744/limousinebustoronto.com/admin/deletelimo.php

<?php

	session_save_path("/home/users/web/b557/sl.flyingcoachlimo/public_html/cgi-bin/tmp");
	session_start();

	if (!isset($_SESSION["verified"]))	{

		header ("Location: index.php");
		exit();
	}


	//	Connect to the database

	include("incDBConnectAdmin.php");

	$query = "SELECT * FROM limos WHERE eID='" . $_GET['limoID'] . "'";

//	Place results into variables

$result = mysql_query($query);
if(!$result)
{
    echo 'Query failed: '.mysql_error();
}
while($row = mysql_fetch_array($result))
{


	$limoname = $row[1];
	$limoload = $row[2];
	$limodetails = $row[3];

}




	//	Determine if the user had submitted new data and update the database

	if (isset($_POST["submit"]))	{

		$limoname	=	$_POST['limoname'];
		$limoload	=	$_POST['limoload'];
		$limodetails	=	$_POST['limodetails'];
		$limoID		=	$_POST['limoID'];

		$query = "DELETE FROM limos WHERE eID='" . $limoID . "'";
		mysql_query($query) or die("<br>error");
		echo "<br><h3 style=color:red>Limousine has been deleted</h3>";

	}


?>

<link rel="stylesheet" href="../stylesheet.css" type="text/css" />
<form enctype="multipart/form-data" action="deletelimo.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="1000000000000" />

	<table align="center" border="0" width="350">
		<tr valign="top" height="25">
			<td>
				<h1>
					www.LetUsDesign.it - Edit.it CMS v1.0.7
				</h1>
			</td>
		</tr>
		<tr>
			<td>
				<br/><br/>
				Delete Limousine
				<br/><br/>
				<h3 style=color:red>** Warning ** This is can not be reversed</font>
				Limo Name: <input type="text" name="limoname" value="<?php echo $limoname; ?>" /><br/>
				Passenger Load: <input type="text" name="limoload" value="<?php echo $limoload; ?>" /><br/>
				Details: <textarea name="limodetails" rows="5" cols="100"><?php echo $limodetails; ?></textarea><br/><br/>
				<h3 style=color:red>Are you sure you wish to delete this limo?</font>
				<input type="submit" name="submit" value="Yes - Delete this limo" /><br/><br/>
				<?php echo "<input type='hidden' name='limoID' value='" . $limoID . "'>"; ?>
			</td>
		</tr>
		<tr>
			<td>
				<br/><br/>
				<a href="main.php">Go Back To Main Menu</a>
				<br/><br/>
				<a href="logout.php">Logout of Page Editor</a>
			</td>
		</tr>
	</table>
</form>

</body>
</html>