Hi, i would be grateful if somone can help me here...
I have this script it is a simple sql delete query that suppose to delete info from a table i get the prop_ID form another page via &_GET and I echo it out in the html and it works, but the script simply doesn't delete the query, i don't know why i can only guess that in the php code the $prop_ID gets lost..just a wilde guess i really don't know WHAT the problem is someone help pleasee..
<?php
session_start();
include ("../includes/conn.inc.php");
if ((isset($_SESSION['user_logged'])) == "" || (isset($_SESSION['user_password'])) == "")
{
include_once ("../includes/unlogged_user.php");
}
else
{
$prop_ID = $_GET['prop_ID'];
if (isset($_POST['submit']))
{
$query_delete = "DELETE FROM right_prop_1 WHERE prop_ID ='$prop_ID' ";
$result_delete = mysql_query($query_delete) or die(mysql_error());
header ("location: ../prop_manager/my_properties.php");
}
else
{
?>
<html>
<head>
<title>Rightmove.co.za - Delete Property</title>
<link href="css/whitetehomabody.css" rel="stylesheet" type="text/css">
<link href="../css/whitetehomabody.css" rel="stylesheet" type="text/css">
<body>
<table width="503" border="1" cellpadding="5" cellspacing="0" bordercolor="#0033FF" bgcolor="#3399FF">
<!--DWLayoutTable-->
<tr>
<td height="50" bordercolor="#99CCCC" bgcolor="#3399FF" class="whitetahoma">Are you sure you want to <span class="headingtopframe">delete</span> property <?php echo $prop_ID; ?>?<br>
There is no way to retrieve your account once you confirm!</td>
<td width="29" rowspan="2" valign="top" bordercolor="#FFFFFF" bgcolor="#FFFFFF" class="ordinairtext">
<?php
include ("../includes/logged_user.php");
?></td>
</tr>
<tr>
<td height="36" bordercolor="#99CCCC" bgcolor="#99CCCC"><form action="delete_prop.php" method="post">
<div align="right">
<input type="submit" name="submit" value="submit">
<input type="button" value=" No " onclick="history.go(-1);">
</div>
</form></td>
</tr>
</table>
<p> </p>
</body>
</html>
<?php
}
}