displaying fields
<p>I have this code
    

<pre><code>$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

mysql_select_db("juliver", $con);

$result = mysql_query("SELECT * FROM menu");

$sm = "";
while($row = mysql_fetch_array($result))
{

$sm .= "&lt;li&gt;&lt;a href='#".$row['page'].'"&gt;'.$row['menulist']."&lt;/a&gt;&lt;/li&gt;";

}

mysql_close($con);

?&gt;
&lt;? echo $sm; ?&gt;
</code></pre>

<p>My database is look like this.</p>

<pre><code>id    menulist          page
1     Home              tb1
2     Gallery           tb2
3     Clothing          tb3
4     Furniture         tb4
5     Household-items   tb5
</code></pre>

<p>the output should be this if converted into html.</p>

<pre><code>&lt;li&gt;&lt;a href="#tb1"&gt;Home&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#tb2"&gt;Gallery&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#tb3"&gt;Clothing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#tb4"&gt;Furniture&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#tb5"&gt;Household-items&lt;/a&gt;&lt;/li&gt;
</code></pre>

<p>I tried removing, adding, renaming and etc into the code and etc. but im still stuck and none of them work.</p>

<p>please help me.</p>
