Hi,
I am trying to display a list of user in a table with Pic's for each user. When you click a users thumbnail another window loads with further details.
My Thumbs are loading but not my table.
Any thoughts folks?
============images5c.php============
<html>
<head>
<title>Thumbs</title>
<script language="javascript">
function imgopn(n,w,h)
{
url = 'thumbs1a.php?num='+n;
set = 'height='+200
+ ',width='+200
+ ',toolbar=yes'
+ ',menubar=yes'
+ ',scrollbars=yes'
+ ',resizable=yes'
+ ',location=yes'
+ ',directories=yes'
+ ',status=yes'
+ ',left='+((screen.width/2)-(w/2))
+ ',bottom='+((screen.height/2)-(h/2));
open(url,n,set);
}
</script>
</head>
<h3>Thumbs</h3>
<?
<?php
$db = mysql_connect("localhost", "username", "passwd")
or die ("cant connect to the DB");
print ("You have connected to database successfully");
?><br><br><?php
mysql_select_db("test",$db);
// $q = mysql_query ("select from ${type} order by id");
$q = mysql_query("SELECT FROM employees order by id",$db);
$count = mysql_num_rows($q)+1;
$piece = (int)($count * .50);
for ( $i=1 ; $i<$count ; $i++ )
{
$row = mysql_fetch_row($q);
//thumb location
$image = $type . 'http://localhost/test1/thumbs/' . $row[0] . '.jpg';
//image location
$big_image = $type . 'http://localhost/test1/images/' . $row[0] . '.jpg';
//image params
$imginfo = getimagesize($big_image);
echo('<table cellspacing="0"><tr>');
echo "<tr><td>Name</td><td>e-mail</td><td>Department</td><td>Photo</td></tr>\n";
{
printf("<tr><td>%s %s</td><td>%s</td><td>%s</td><td>%s</td>",
$myrow[1], $myrow[2],$myrow[3], $myrow[4], $myrow[5]);
}
echo('<td></td></tr><img src="' . $image . '" onclick="imgopn(\'' . $row[0] . '\',' . $imginfo[0] . ',' . $imginfo[1] . ',\'' . $type . '\')">');
echo("\n");
if($i % $piece == 0)
echo('<br/>');
// increment our counter
$i++;
}
echo "</table>\n";
?>
</html>