Hi,
I need help with this... can anyone help me?? Plssssss
Im getting Parse error: syntax error, unexpected T_VARIABLE, expecting T_STRING in line 10

What's wrong with it... can't seemed to find the error. Im trying to make my blog display the video.

<?php
$file = $_GET['file'];
$image = $_GET['image'];
?>
<script type='text/javascript' src='http://domain.com/jwplayer.js'></script>
<div id='mediaspace'>domain.com</div>

<script type='text/javascript'>
jwplayer('mediaspace').setup({
'flashplayer': 'http://domain.com/player.swf',
'file': '<?php echo $file;?>',
'image': '<?php echo $image;?>',
'title': 'title',
'controlbar': 'bottom',
'width': '470',
'height': '320'
});
</script>

Have you tested what are the values are in the $_GET? Are they comming from a form or you construct a URL + query string some other way? You should always check for posted values:

if(isset($_GET['file']) && isset($_GET['image'])) {
    $file = $_GET['file'];
    $image = $_GET['image'];
} else {
    // handle error as apprpriate for your app
    // i.e die...
    die('Error: File or image missing!');
}

Thank you, broj1.. I have solved the problem. Thanks again :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.