More PHP and MySQL Problems with My Script
| From: | Austin Carpenter | Date: | Wed, 01 Nov 2000 01:33:36 +0000 |
| Subject: | More PHP and MySQL Problems with My Script | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-23046@lists.php.net to get a copy of this message | ||
Hi,
Thanks to those who helped on my previous question.
Well, now the loop is not working. It is not outputting the html. Here it is:
while ($row = mysql_fetch_array($result)) {
$fname = $row['fname'];
$lname = $row['lname'];
$email = $row['email'];
$level = $row['level'];
$id = $row['id'];
$date = $row['date'];
$rating = $row['rating'];
$homeriver = $row['homeriver'];
$strengths = $row['strengths'];
$weaknesses = $row['weaknesses'];
$summary = $row['summary'];
$style = $row['style'];
$productyear = $row['productyear'];
$productexperience = $row['productexperience'];
$similar = $row['similar'];
$name = $fname." ".$lname;
if ($date == "0000-00-00") {
$date = "[unknown]";
}
$ratingphoto = "/rating".$rating.".gif";
$display_block = '
<table bgcolor=\"#ffffff\" width=75%>
<tr>
<td width=\"75%\" height=\"30\" colspan=\"2\" align=\"left\" valign=\"middle\" bgcolor=\"#85b2ad\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\">
<font face=\"verdana, arial, helvetica\" size=\"-1\">
Submitted by
<b><A HREF=\"mailto:<? echo $email; ?> \"><? echo $name; ?></A>a <? echo $style; ?> Kayaker
from <? echo location; ?><br>Date Reviewed: <b><? echo date; ?></b> </font> </td> </tr> <tr> <td width=\"20%\" align=\"left\" valign=\"top\" bgcolor=\"#efefdf\"><font face=\"verdana, arial, helvetica\" size=\"-1\"> <b>Home River:</b></font></td> <td width=\"100%\" align=\"left\" valign=\"top\" bgcolor=\"#efefdf\"><font face=\"verdana, arial, helvetica\" size=\"-1\"><? echo $homeriver; ?></font></td> </tr> <tr> <td width=\"20%\" align=\"left\" valign=\"top\" bgcolor=\"#efefdf\"><font face=\"verdana, arial, helvetica\" size=\"-1\"> <b>Product Experience:</b></font></td> <td width=\"100%\" align=\"left\" valign=\"top\" bgcolor=\"#efefdf\"><font face=\"verdana, arial, helvetica\" size=\"-1\"><? echo $productexperience; ?></font></td> </tr> <tr> <td width=\"20%\" align=\"left\" valign=\"top\" bgcolor=\"#efefdf\"><font face=\"verdana, arial, helvetica\" size=\"-1\"> <b>Strengths:</b></font></td> <td width=\"100%\" align=\"left\" valign=\"top\" bgcolor=\"#efefdf\"><font face=\"verdana, arial, helvetica\" size=\"-1\"><? echo $strengths: ?></font></td> </tr> <tr> <td width=\"20%\" align=\"left\" valign=\"top\" bgcolor=\"#efefdf\"><font face=\"verdana, arial, helvetica\" size=\"-1\"> <b>Weaknesses:</b></font></td> <td width=\"100%\" align=\"left\" valign=\"top\" bgcolor=\"#efefdf\"><font face=\"verdana, arial, helvetica\" size=\"-1\"><? echo $weaknesses; ?></font></td> </tr> <tr> <td width=\"20%\" align=\"left\" valign=\"top\" bgcolor=\"#efefdf\"><font face=\"verdana, arial, helvetica\" size=\"-1\"> <b>Similar Products Tried:</b></font></td> <td width=\"100%\" align=\"left\" valign=\"top\" bgcolor=\"#efefdf\"><font face=\"verdana, arial, helvetica\" size=\"-1\"><? echo $similar; ?><BR></font></td> </tr> <tr> <td width=\"20%\" align=\"left\" valign=\"top\" bgcolor=\"#efefdf\"><font face=\"verdana, arial, helvetica\" size=\"-1\"> <b>Summary:</b></font></td> <td width=\"100%\" align=\"left\" valign=\"top\" bgcolor=\"#efefdf\"><font face=\"verdana, arial, helvetica\" size=\"-1\"><? echo $summary; ?></font></td> </tr> <tr> <td colspan=2 width=\"100%\" align=\"left\" valign=\"middle\" bgcolor=\"#efefdf\"> <font face=\"verdana, arial, helvetica\" size=\"-1\"> <b>Overall Rating:</b> <img src="<? echo $ratingphoto; ?>" alt="5" border="0" align=center> </font> </td> </tr> </table> <br> '; and here is the html: <div align="left"> <ul> <br> <!-- BEGIN REVIEWS --> <? eval ("$display_block"); ?> <!-- END REVIEWS--> <br> </ul> </div> Does anyone have any ideas why this isn't fully working? Here is the link: http://theplayspot.com/genericreviewshow.php Also, it is not showing the manufacturer's url like it looks like it should be. Here is the html for that: <td> <!-- End Review Summary --> <br> <font face="verdana, arial, helvetica" size="1" color="000000"> </font> <br> <font face="verdana, arial, helvetica" size="1" color="000000"> <b><? echo $manufacturerurl; ?></b> </font> <BR> <font face="verdana, arial, helvetica" size="1" color="000000"> <b><a href="<? echo $manufacturerurl; ?>" target="new"><? echo $manufacturername; ?></a> </b> </font> </td> Sorry it is kind of a long e-mail, but I just can't figure this out :(. Thanks in advance for the help. Thanks, Austin _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com.