لو سمحتوا انا عندي جدول يحوي مجموعة من المتغيرات
وانا راح اعرض الرقم والوصف في صفحة ويكون بجانب كل رقم ووصف كلمة عرض وحذف
المفروض اذا ضغط على عرض تطلع له باقي البيانات الخاصة بها الرقم واذا ضغط حذف تنحذف من قاعدة البيانات
بالنسبة للصفحة اللي بيصير فيها الرقم والوصف تشتغل معي تمام
واذا اختار حذف تنحذف بدون اي مشاكل
المشكلة عندي اذا اختار عرض ماتطلع له اي قيمة من قاعدة البيانات مدري وين المشكلة
وهذا الكود الصفحة اللي راح يطلع منها الرقم والوصف
<!DOCTYPE HTML SYSTEM>
<html dir=rtl>
<head>
<title>الشكوى </title>
</head>
<body>
<div>
<form name = "com" method ="POST">
<?
$connect=mysql_connect("localhost","root","");
mysql_select_db("b");
mysql_query("set names 'utf8'");
$sq= mysql_query("select Sn,Com_description from com");
echo "<table width=\"400\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\">";
while($mysqlf= mysql_fetch_array($sq))
{
$sn=$mysqlf['Sn'];
$com_description=$mysqlf['Com_description'];
echo "<tr bgcolor=\"#CCCCCC\"><td colspan = \"4\" >$sn</td><td>" ?><a href ="veiwjj.php"> عرض </a>
<? echo "<td>" ?><a href="deletco.php?Sn=<?php echo $sn; ?>">حذف</a>
<? echo "</td></tr>";
echo "<tr><td colspan =\"6\" >$com_description</td><td>";
echo "</table>";
echo "<table width=\"400\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\">";
}
echo "</table>";
?>
</div>
</body>
</html>وهنا كود صفحة veiwjj والمفروض تطلع كل البيانات الخاصة بالرقم اللي بيختاره من قاعدة البيانات وطبعا مايطلع لي اي شي
<!DOCTYPE HTML SYSTEM>
<html dir=rtl>
<head>
<title></title>
</head>
<body>
<?
$ssn=$_POST['$sn'];
$connect=mysql_connect("localhost","root","");
mysql_select_db("b");
echo $sn;
mysql_query("set names 'utf8'");
$sq= mysql_query("select * from com where Sn ='$ssn'");
echo "<table width=\"400\" border=\"2\" cellpadding=\"0\" cellspacing=\"1\">";
echo "<tr>";
echo "<th align=\"center\" width=\"78\" bgcolor=\"#CCCCCC\">";
echo "الرقم";
echo "</th>";
echo "<th>";
echo $sq['Sn'];
echo "</th>";
echo "</tr>";
echo "<tr>";
echo "<th align=\"center\" width=\"78\" bgcolor=\"#CCCCCC\">";
echo "الاسم";
echo "</th>";
echo "<th>";
echo $sq['$Fname_com'];
echo $sq['$Mname_com'];
echo $sq['$Lname_com'];
echo "</th>";
echo "</tr>";
echo "<tr>";
echo "<th align=\"center\" width=\"78\" bgcolor=\"#CCCCCC\">";
echo "رقم الهاتف";
echo "</th>";
echo "<th>";
echo $sq['Tel_num'];
echo "</th>";
echo "</tr>";
echo "<tr>";
echo "<th align=\"center\" width=\"78\" bgcolor=\"#CCCCCC\">";
echo "الوصف";
echo "</th>";
echo "<th>";
echo $sq['$Com_description'];
echo "</th>";
echo "</tr>";
echo "<tr>";
echo "<th align=\"center\" width=\"78\" bgcolor=\"#CCCCCC\">";
echo "الحالة";
echo "</th>";
echo "<th >";
echo $sq['state'];
echo "</th>";
echo "</tr>";
echo "<tr>";
echo "<th align=\"center\" width=\"78\" bgcolor=\"#CCCCCC\">";
echo "الحل";
echo "</th>";
echo "<th>";
echo $sq['Solve_description'];
echo "</th>";
echo "</tr>";
mysql_close($connect);?>
<a href = "deletco.php">حذف</a>
<a href = "updatej.php">تعديل</a>
</form>
</body>
</html>