I'm a PHP Newbie and I'm not affraid to admit... OK now that that is out of the way I need a hand with a small portion of code that is giving me headaches.
It grabs the information for the selected eeId but it displays about 100 copies of Error! Error! after it. Any ideas based on the code below.
$connect = @mysql_connect($serverName,$dbUsername,$dbPassword)or die("Could not connect");
mysql_select_db($theD😎;
$results = mysql_query("SELECT dvd.title, dvd.studio, easterEggs.eeId, easterEggs.egg FROM dvd INNER JOIN easterEggs ON dvd.dvdId = easterEggs.dvdId") or die("Could not connect Again");
echo COM_siteHeader();
while ($row = @mysql_fetch_array($results)){
$eggId = $row['eeId'];
if ($eeId == $eggId){
do{
echo COM_startBlock($row['title'] . " Easter Egg");
print ("<table cellspacing=0 cellpadding=3 border=0 width=100%>\n<tr><td>\n");
print ("<b>{$row['studio']}</b>\n</td></tr>\n");
print ("<tr><td>\n<br>\n{$row['egg']}\n");
print ("</td></tr></table>");
break;
}while ($row = @mysql_fetch_array($results));
}else {
print ("Error! Error!");
}
}
mysql_close($connect);