Hi guys, sorry to bother but i REALLY need some help.
I am trying to build a shoutbox, and have the following code:
<?php
$dbhost = 'localhost';
$dbusername = program;
$dbpass = e387985;
$dbname = program_program;
$tablename = coldshout;
$connect = mysql_connect("$dbhost","$dbusername","$dbpass")
or die ("&content=Could not connect to the database");
$db = mysql_select_db("$dbname",$connect)
or die ("&content=Could not select the database");
$shout_echo = mysql_query("SELECT FROM $tablename ORDER BY id DESC LIMIT 5");
$color_a = "#3399CC";
$color_b = "#99CCFF";
echo "<table cellpadding=\"1\" cellspacing=\"1\" width=\"100%\">";
while ($c_shout = mysql_fetch_array($shout_echo)) {
$row_color = ($row_count % 2) ? $color_a : $color_b;
echo "
<tr>
<td align='center' bgcolor=\"$row_color\">
<a herf =\"mailto:".$c_shout['email']."\">".$c_shout['post_by']."</a><br>
<a herf =\"".$c_shout['website']."\">".$c_shout['webname']."</a></td>
<td bgcolor=\"$row_color\">".$c_shout['content']."</td>
";
$row_count++;
}
echo "</tr></table>";
?>
I setup the database, and inserted the proper values, so it should work...
but instead i get this
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/program/public_html/shout/connect.php on line 20
Can someone please help me, its driving me insane!!!
I really appriciate your time,
~Gabor