السلام عليكم
اخواني يوجد لدي خطاء في الاستعلام ولا ادري اين الخطاء
الكود
كود PHP:
<?php
session_start();
if(!session_is_registered(myusername)){
header("location:login.php");
}
include('config.php');
$id=$_GET['id'];
$emp=$_SESSION['emp'] ;
$sql="SELECT * FROM services WHERE id='$id' ";
$result=mysql_query($sql);
while($rows=mysql_fetch_array($result)) {
$name = $rows['name'].'999999999';
echo $name;
$sql2="SELECT * FROM whe WHERE ier='$emp' ";
$result2=mysql_query($sql2);
while($row=mysql_fetch_array($result2)) {
$title = $row['title'];
echo $title;
}
?>
<html dir="rtl">
<head>
</head>
<body >
<h2><?php echo $rows['name']; ?></p></font></h2>
<h3><?php echo $rows['info']; ?>
</body>
</html>
<?php } ?>
المشكله في الاستعلام الثاني لايظهر النتيجة
كود PHP:
$sql2="SELECT * FROM whe WHERE ier='$emp' ";
$result2=mysql_query($sql2);
while($row=mysql_fetch_array($result2)) {
$title = $row['title'];
echo $title;
}