I inserted the following coding to create a movie database:
<?
$connection = mysql_connect('localhost', 'username', 'password');
mysql_select_db('wu_wrestleinfo_com', $connection);
$query = mysql_query("SELECT * FROM movie WHERE id='$id' ");
$content = mysql_fetch_array($query);
mysql_close($connection);
?>
<html>
<head>
<title>Movie displays</title>
</head>
<body>
ID : <? echo $content[id];?><br>
Name : <? echo $content[name];?><br>
Year : <? echo $content[year];?><br>
Director(s) : <? echo $content[directors];?><br>
Cast : <? echo $content[cast];?><br>
Description : <? echo $content[description];?><br>
</body>
</html>
I entered the right username and password, but took them off for security reasons.
I get the following error on my page:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/virtual/site11/fst/var/www/html/display.php on line 7
I would really appreciate help on this topic.