Hello
i am new to mysql and am setting up a tagboard that i got from:
when i run it, i get an error:
Warning: Supplied argument is not a valid MySQL result resource in /home/mancroft/john/tagboard/view.php on line 15
the file view.php is:
<?php
#change localhost to the sql server, user to the correct username, and pass to the correct password
$con = mysql_connect("localhost","mancroft","csHah3W" or die("Unable to establish a connection to the database."
#change database to the database name
$database = "mancroft_tagboard";
$db = mysql_select_db("$database" or die("Couldn't select database $database."
$query = "SELECT id,name,http,msg FROM tagboard ORDER BY id DESC";
#selects all the rows from the table tagboard and orders them in descending order
$result = mysql_query($query);
while ($rows = mysql_fetch_row($result))
{
echo "<a href='$row[http]' target='_blank'>$row[name]</a>: $row[msg]<br>";
}
?>
Any idea what is wrong?
TIA
i am new to mysql and am setting up a tagboard that i got from:
when i run it, i get an error:
Warning: Supplied argument is not a valid MySQL result resource in /home/mancroft/john/tagboard/view.php on line 15
the file view.php is:
<?php
#change localhost to the sql server, user to the correct username, and pass to the correct password
$con = mysql_connect("localhost","mancroft","csHah3W" or die("Unable to establish a connection to the database."
#change database to the database name
$database = "mancroft_tagboard";
$db = mysql_select_db("$database" or die("Couldn't select database $database."
$query = "SELECT id,name,http,msg FROM tagboard ORDER BY id DESC";
#selects all the rows from the table tagboard and orders them in descending order
$result = mysql_query($query);
while ($rows = mysql_fetch_row($result))
{
echo "<a href='$row[http]' target='_blank'>$row[name]</a>: $row[msg]<br>";
}
?>
Any idea what is wrong?
TIA