السلام عليكم و رحمة الله وبركاته
كل عام و انتم بخير
مشكلتي يا أخوان عندي هذا الكود
include('config.php');
$suppliers=mysql_query("SELECT * FROM supplier ORDER BY supplier_id DESC");
.
.
.
While($res=mysql_fetch_object($suppliers)){
?>
<div align="center">
<table border="0" width="90%" class="bodytbl">
<tr>
<td width="02%"><p align="left"><?=$res->supplier_id?></p></td>
<td width="10%"><p align="left"><?=$res->supplier_name?></p></td>
<td width="10%"><p align="left"><?=$res->first_name?></p></td>
<td width="10%"><p align="left"><?=$res->last_name?></p></td>
<td width="20%"><p align="left"><?=$res->email?></p></td>
<td width="10%"><p align="left"><?=$res->mobile?></p></td>
<td width="05%"><p align="left"><?=$res->activation?></p></td>
<td width="15%"><p align="left"><?=$res->registration_date?></p></td>
<td width="09%"><p align="left">
<script type="text/javascript">
<!--
function disp_confirm(){
var r=confirm("Are You Sure to delete this Supplier?")
if(r==true){
// alert("supplier_id=<?=$res->supplier_id?>")
document.location.href="delete_supplier.php?supplier_id=<?=$res->supplier_id?>"
}
else
{
document.location.href="suppliers.php"
}
}
-->
</script>
<input type="submit" value="Delete" onclick="disp_confirm()" style="border:0; font-weight : bold;"></p></td>فالناتج من عملية الحذف انه يحذف لي أصغر قيمة من ال (SUPPLIER_ID) و المفروض انه يحدد لي قيمة الاي دي المراد حذفها
فشو الغلط اللي بالكود هذا .... لأني صراحة مالي خبرة بالجافا سكربت ؟؟
أتمنى منكم المساعدة
أخوكم سامي