Beginning PHP, Apache, MySQL Web Development in cap 4 pag 134 , i can run consult data SQL in php, already I made several times and nonfunction in cap 4 please help me imcpy the errata code and nathing what happend....
this the codeJavascript
:insertsmilie('

')
<?php
$link=mysql_connect("localhost","root","mials")or die(mysql_error());
mysql_select_db("wiley") or die (mysql_error());
$query = "SELECT
movie_name,
movie_director,
movie_leadactor,
FROM
movie";
$result=mysql_query($query,$query) or die(mysql_error());
$num_movies=mysql_num_rows($result);
$movie_header=<<<EOD
<h2><center>Movie Review Database</center></h2>
<table width='70%' border='1' cellpadding='2'
cellspacing='2' align='center'>
<tr>
<th>Movie Title</th>
<th>Year of Release</th>
<th>Movie Director</th>
<th>Movie Lead Actor</th>
//<th>Movie Type</th>
</tr>
</table>
EOD;
while($row=mysql_fetch_array($result))
{
$movie_name=$row['movie_name'];
$movie_director=$row['movie_director'];
$movie_leadactor=$row['movie_director'];
$movie_details.=<<<EOD
<tr>
<td>$movie_name</td>
<td>$movie_director</td>
<td>$movie_leadactor</td>
</tr>
EOD;
}
$movie_details.=<<<EOD
<tr>
<td> </td>
<tr>
<td>Total:$num_movies Movies</td>
</tr>
EOD;
//echo $movie;
?>:(


