Hello,
Thanks in advance for any help provided.
Ok this is driving me crazy, i don't know if its a php problem, or an html problem..but they are related.
i have a table, 3 columns. in the column on the right i have my php script. wich goes into a database and retrieves information. the table where the information resides is long, so i on the page i only show the first 7 using if/else statements in a while loops as follows:
$num = 0;
while ($row = mysql_fetch_array($result)) {
if ($num >= 7) {
return;
}
else {
$article_id = $row["article_id"];
$date = $row["date"];
$headline = $row["headline"];
$summary = $row["summary"];
$full_article = $row["full_article"];
$courtesy_of = $row["courtesy_of"];
$pic = $row["pic"];
$num = $num+1;
//Print out the data
echo "
<img src=/news/images/bullet.gif width=10 height=10>
$date
<br>
<font size=4 color=#FF9900>$headline</font>
<br>
<i>$summary</i>
<br>
<br>
<a href=/news/article.php?art=$article_id><i>more...</i></a>
<br>
<br>
<br>
";
}
}
now the problem is not with the php script. its this: if i were to show any less than the exact number (or greater) of rows from the table, all the html after the php script does not appear. you can understand my frustration im sure. If i show all the rows then the rest of the page shows up fine.
There has to be a reason. Thanks for any help.
Mike