Hello
I am writting a simple links scripts for my site and i would like to number the links.
For example
1. link 1
2. link2
3. ... and so on
I was wondering how you would do this using php.
Here is the code:
<?php
$mysql_db = "links"; ////////// The name of the database you are using
$mysql_u = "root"; /////////// Your mysql user name
$mysql_p = "" ; ///////////your mysql password
MYSQL_CONNECT("localhost","$mysql_u","$mysql_p");
mysql_select_db("$mysql_db");
$query = "SELECT url,title FROM tv WHERE active = 'yes'";
$result = mysql_query($query);
while ($row = mysql_fetch_assoc($result))
{
$menu = "<a href=\"show.php?p={$row['url']}\">{$row['title']}</a><br>" ;
echo ("$menu");
////////////////////
}
MYSQL_CLOSE();
?>
Thank you,