Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable
<p>I keep getting this error when I do this:</p>

<pre><code>&lt;?php
$info = $_POST['mname'];
$info = ucwords($info);

// Make a MySQL Connection
mysql_connect("localhost", "user", "password") or die(mysql_error());
mysql_select_db("javadatest") or die(mysql_error());  

// Get a specific result from the "example" table
$result = mysql_query("SELECT * FROM movieList
WHERE name = '$info'") or die(mysql_error());  

// get the first (and hopefully only) entry from the result
$row = mysql_fetch_array( $result );
// Print out the contents of each row into a table 
//echo $row['name']." ".$row['year']." ".$row['genre'];
echo "
  &lt;script language=javascript&gt;
  var jsvar;
  jsvar = &lt;?php echo $row['name'], $row['year'], $row['genre'];?&gt;
  function buy() {
    window.location = \"https://www.paypal.com\";   
    alert(\"Thanks for shopping at Movie Store\");     
  }
  var myWindow = window.open('', '', 'width = 300, height = 300);
  myWindow.document.write(jsvar);
  myWindow.document.write('&lt;body&gt;'); 

  myWindow.document.write('&lt;input type="button" value="Buy" onclick=/"buy()/"&gt;');

  myWindow.document.write('&lt;/body&gt;');

 //myWindow.buy = buy;
 &lt;/script&gt;
";
?&gt;
</code></pre>

<p>I'm trying to use javascript in a php file by putting my javascript code in my echo statement. I can't figure out what I'm doing wrong. Any help would be appreciated.</p>
