Parse error: syntax error, unexpected T_STRING

I`m brand new to PHP, currently working my way through Kevin Yanks book. I got stuck with the following error message and cant seem to locate the problem: Parse error: syntax error, unexpected T_STRING. Any input is deeply appreciated.

Here is the line that gets the error message:

$error = 'Error adding submitted player: ' . mysqli_error($link);

And here is the code surrounding it:

if (isset($_POST['lastname']))
{
  $lastname = mysqli_real_escape_string($link, $_POST['lastname']);
  $sql = 'INSERT INTO players SET
      lastname="' . $lastname . '";
  if (!mysqli_query($link, $sql))
  {
    $error = 'Error adding submitted player: ' . mysqli_error($link);
	include 'error.html.php';
	exit();
  }

It looks as though you are not closing the SQL statement correctly.

Try this code:


  $sql = '
              INSERT INTO players 
              SET lastname="
           ' 
  	.  $lastname 
	.   '"';  		
  echo $sql;    
  die;


.

That did the trick. Thanks, John!

Man thanks - glad I was able to help.

.