Forum Moderators: coopster

Message Too Old, No Replies

$pageid script - more help with

         

electricocean

10:01 pm on Mar 31, 2005 (gmt 0)

10+ Year Member



Hi, I want to make a $page variable to the?pageid=x. I want the 'x' to equal to a URL like so:

<?php
$PageID = $_GET["pageid"];

//brackets needed as . can be used in variable names.
$filename = "${PageID}";

//everything ok so get the page.
print "<p><embed src="$filename" width="320" height="260" type="video/quicktime"></p>";
?>

but it doesn't work and it always gives me this error:

Parse error: parse error, unexpected T_VARIABLE in /usr/export/www/hosting/csebvideo/movies/play_movie.php on line 10

can you help me fix it?

thanks,
electricocean

Span

10:34 pm on Mar 31, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi, try escaping the double quotes in your print lines:

print "<p><embed src=\"$filename\" width=\"320\" height=\"260\" type=\"video/quicktime\"></p>";

Or use single quotes:

print '<p><embed src="$filename" width="320" height="260" type="video/quicktime"></p>';