"; echo "
"; //select user if ($loggedIn == false){ echo "
"; echo "
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
Enter password:
"; echo "
"; echo "
"; } if ($loggedIn == true) { $mysql_link = mysql_connect ("localhost", "jrcc2009", "ph0t0st0r3") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ("jrcconline"); $result = mysql_query("SELECT * FROM users WHERE userID='$client'"); $i=0; $userName=mysql_result($result,$i,"userName"); //gallery header echo "
Log Out

"; echo "

Photos for $userName

"; echo "
Click on the thumbnail to view photo:
"; $result = mysql_query("SELECT * FROM photos WHERE userID='$client'"); $num=mysql_numrows($result); //thumbnail table echo ""; $i=0; while ($i < $num) { $cols=0; echo ""; while ($cols < 6 AND $i < $num){ $userID=mysql_result($result,$i,"userID"); $photoBA=mysql_result($result,$i,"photoBA"); $photoName=mysql_result($result,$i,"photoName"); echo ""; if ($currentPhoto =="") { $currentPhoto = "$photoName"; } $i++; $cols++; } echo ""; } echo "
"; //photo, desc and footer $result = mysql_query("SELECT * FROM photos WHERE photoName='$currentPhoto'"); $i=0; $photoDesc=mysql_result($result,$i,"photoDesc"); echo "
"; echo "
"; echo "
$photoDesc
"; echo "
"; echo "
"; mysql_close(); //end of select user if statement } ?>