displaying info in rows
Posted: Wed May 19, 2004 9:18 pm
Ok
I am writing a script that basically takes data from a table, specifically names of different users, and displays them as links. I have it setup, but when it displays the links, they are right after eachother. http://www.marker5a.com/dbmenu.php I would like to set it up, so that after each link it goes to the next line and puts the next link. My script is
<?php
$db = mysql_connect("*", "*", "*");
mysql_select_db("profile",$db);
$sql="SELECT FirstName,LastName,contact_id FROM `names`";
$result=mysql_query($sql,$db);
while($row=mysql_fetch_array($result))
{
$id = $row["contact_id"];
$FirstName = $row["FirstName"];
$LastName = $row["LastName"];
echo "<a href=http://www.marker5a.com/db.php?id=$id>$FirstName $LastName</a>";
}
?>
PLease help me
Thanks you
Chris
I am writing a script that basically takes data from a table, specifically names of different users, and displays them as links. I have it setup, but when it displays the links, they are right after eachother. http://www.marker5a.com/dbmenu.php I would like to set it up, so that after each link it goes to the next line and puts the next link. My script is
<?php
$db = mysql_connect("*", "*", "*");
mysql_select_db("profile",$db);
$sql="SELECT FirstName,LastName,contact_id FROM `names`";
$result=mysql_query($sql,$db);
while($row=mysql_fetch_array($result))
{
$id = $row["contact_id"];
$FirstName = $row["FirstName"];
$LastName = $row["LastName"];
echo "<a href=http://www.marker5a.com/db.php?id=$id>$FirstName $LastName</a>";
}
?>
PLease help me
Thanks you
Chris