... I really don't believe that...Joe wrote:Yes Illusionist i did actually see that code and i tried it. The only problem is that it worked far worse than the original.
news script?
Moderator: General Moderators
-
Illusionist
- Forum Regular
- Posts: 903
- Joined: Mon Jan 12, 2004 9:32 pm
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Try this:
It looked like in your code you sort of changed the value of $row midstream. See if the code above helps.
Code: Select all
<?php
$link = mysql_connect("???", "???", "???");
if ( !@mysql_select_db("???") )
{
die("couldnt connect " . mysql_error());
}
$sql = "SELECT * FROM news ORDER BY ID";
if ( !($result = @mysql_query($sql)) )
{
die("<p>Sorry, there was a problem: " . mysql_error() ."</p>");
}
while ( $row = mysql_fetch_array($result) )
{
echo "<img src='news.gif' border=1>";
echo "<br><u><b>.:" . $row['headline'] . ":.</U></b> posted by " . $row['username'] . "<br>";
echo $row['mainnews']."<br>";
echo "<hr color='white'>";
}
mysql_close($link);
?>