hello
using weedpacket's code:
$sql = "SELECT employee_photo, employee_name, employee_id FROM employees WHERE name_id = '$name_id'";
$result = mysql_query($sql) or die (mysql_error());
$rows = mysql_num_rows($result);
if($rows > 0) {
$nowbreak = 4;
echo "<table>\n";
echo "<tr>\n";
for($i=1; $i<=$rows; $i++) {
$row=mysql_fetch_array($result);
echo "<td><img src=\"images/".$row['employee_photo']."\"><br />".$employee_name."</td>\n";
if($i%$nowbreak==0) {
echo "</tr><tr>\n";
}
}
echo "</tr></table>";
}
what is the best way to go about passing the employee_id variable to a popup? so each employee photo will be <a href=... including the employee_id variable.
there are lots of examples around (i have spent the last few hours looking) but all where the javascript is outside the php then they just use
<?php echo '$row['employee_id']' ?>
in the appropriate place. i cannot seem to do that because of the loop. i would appreciate any tips.
many thanks