PDA

View Full Version : سوال: شرط گذاشتن خروجی tree منو



arashaliz
چهارشنبه 20 آذر 1392, 11:55 صبح
با سلام

یک منو ساده نوشته بودم حالا یک tree می خواهم بهش اضافه کنم اگه ممکنه یک نگاهی بندازین ببینین مشکل کجاس که کار نمیکنه.
113785113785
منویی که کار می کنه و می خوام به tree اضافه بشه

<?php
include('config.php');

if (isset($_GET['Url'])) {
$Url = $_GET['Url'];
} else { $Url = '0'; }

mysql_query("set names 'utf8'");
$result = mysql_query("SELECT * FROM sarfasl where Sarfasl_Parent='$Url'") ;


// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array( $result )) {
// Print out the contents of each row into a table

$Sarfasl_Id =$row['Sarfasl_Id'];
$Sarfasl_Title =$row['Sarfasl_Title'];
$Sarfasl_Gh =$row['Sarfasl_Gh'];
$Sarfasl_Parent =$row['Sarfasl_Parent'];
$Sarfasl_bool =$row['Sarfasl_bool'];


if($Sarfasl_bool==0){
echo "<div><a href=\"mmd.php?Url=$Sarfasl_Id\">" .$Sarfasl_Title . " </a> </div>\n";
} else {
echo "<div><a href=\"m.php?Url=$Sarfasl_Id\">" .$Sarfasl_Title . " </a> </div>\n";
}

}


?>

کل فایل tree با دیتا بیس رو هم اتتچ کردم

پیشاپیش ممنون