Thanks for all your help in advanced guys.
I apologize in advanced if my code is a little bogus.. this is my first time with PHP.
Now the link is actually showing on the code i am about to post .. but what i really want to do is create the link from the ID of the user showing the name as the link but as i said using the ID as the link.
Now i think i have it to this point .. cause now its actually showing the ID of the user whenever i roll the mouse over the link .. you will see the link as ..
http://XX.XXX.XX.XXX/show.php?show=34 ... for example ..
This is the code ...
<?php
include 'include/func.php';
include 'headered2.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Psychics</title>
<script type="text/javascript" language="JavaScript1.2" src="stmenu.js"></script>
</head>
<body>
<script type="text/javascript" language="JavaScript1.2" src="test.js"></script>
<table width="475" border="0" align="right">
<tr>
<td>
<?php
$columns = 3;
$query = "SELECT id, fname, photo FROM users ORDER BY fname";
$result = mysql_query($query);
$num_rows = mysql_num_rows($result);
$rows = ceil($num_rows / $columns);
echo '<ul>';
while($row = mysql_fetch_array($result)) {
$data[] = "<img src=http://XX.XXX.XX.XXX/images/".$row['photo'] .">";
$data2[] = $row['fname'];
$data3[] = $row['id'];
}
echo "<TABLE BORDER=\"0\" cellpadding=0 cellspacing=10>\n";
for($i = 0; $i < $rows; $i++) {
echo "<TR>\n";
for($j = 0; $j < $columns; $j++) {
if(isset($data[$i + ($j $rows)])) {
echo "<TD align=center>" . $data[$i + ($j $rows)] . "<br>";
echo "<a href='show.php?show={$data3[$i + ($j $rows)]}'>" . $data2[$i + ($j $rows)] . "</a></td>\n";
}
}
echo "</TR>\n";
}
echo "</TABLE>\n";
echo '</ul>';
$id = $_POST['id'];
?> </td>
</tr>
</table>
The output is as i need it in a multicolumn format .. 3 columns ordered by fname(first name) .. where it displays the picture and the name showing the name as the link but the real link is the record id()
Now i am not able to pass that value over to the show page.. i am still doing somehting wrong guys ..
Thanks for all your help in advanced.
Have a nice weekend you all
Edward