سلام عزیزان
این جدول من هست :
88.jpg
با کلیک بر روی دکمه عملیات حذف انجام نمی گیرد خطایی هم ندارم،در آدرس بار مرورگر id شناسایی می شود ولی حذف نمی شود:
http://localhost/personal/del.php?id=2
<table width="600" border="1" cellpadding="1" cellspacing="1">
<tr>
<th>شماره</th>
<th>نام و نام خانوداگی</th>
<th>ایمیل</th>
<th>موضوع</th>
<th>توضیحات</th>
<th>عملیات</th>
</tr><?php
while($user=mysql_fetch_assoc($records))
{
echo "<tr>";
echo "<td>".$user['c_id']."</td>";
echo "<td>".$user['c_fullname']."</td>";
echo "<td>".$user['c_email']."</td>";
echo "<td>".$user['c_subject']."</td>";
echo "<td>".$user['c_descrip']."</td>";
echo '<td><a href="del.php?id='.$user['c_id'].'"> حذف </a></td>';
echo "</tr>";
}?>
</table>
این کدهای پردازش :
if(isset($_GET['c_id']))
{
$id = mysql_real_escape_string($_GET['c_id']);
$con=mysql_coect("localhost","root","");
if(!$con)
{
die("Colud Not Coect: ".mysql_error());
}
mysql_select_db("db_payam",$con);
$Query="DELETE FROM contact WHERE c_id=$id";
if(!mysql_query($Query,$con))
{
die("Error: ".mysql_error());
}mysql_close($con);
echo "Success Delete Record Please Refresh!";
تشکر
برچسب:
نویسنده: محمد رضا جوادیان