Jump to content

syntax error, unexpected $end in


Pieter Lategan

Recommended Posts



Hi 

I got this error                         Parse error: syntax error, unexpected $end in C:\xampp\htdocs\chapter2\table1.php on line 60
  can someone maybe help me with it.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>

<?php 

//connect to MySQL
$connect = mysql_connect ("localhost", "root","")
or die ("Hey loser, chech your server connection.");

// make sure we're using the right database
mysql_select_db ("moviesite")
or die (mysql_error());

$query = "select movie_name, movie_director, movie_leadactor " .
"from movie";

$result = mysql_query($query, $link)
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;

$movie_details= '';
while ($row = mysql_fetch_array($result)) {
$movie_name = $row ['movie_name'];
$movie_director =$row['movie_director'];
$movie_leadactor = $row['movie_leadactor'];

$movie_details .=<<<EOD
<tr>
<td> </td>
</tr>
<tr>
<td>Total :$num_movies Movies</td>
</tr>
EOD;

echo $movie_header;
?>
</body>
</html>
This is line 60


Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.