I want to create a script that will display video if the file format of file uploaded by user is video file or image if the file format is image file, I don't have problem with the query and the extension function, but I'm having problem with displaying the result of the image and playing the video, below is the code
<?php
$file = $row1['file'];
$ext = pathinfo($file, PATHINFO_EXTENSION);
if ($ext == 'mp4' || $ext == 'mov' || $ext == 'vob' || $ext == 'mpeg' || $ext == '3gp' || $ext == 'avi' || $ext == 'wmv' || $ext == 'mov' || $ext == 'amv' || $ext == 'svi' || $ext == 'flv' || $ext == 'mkv' || $ext == 'webm' || $ext == 'gif' || $ext == 'asf') {
echo"<div class='flowplayer' data-swf='flowplayer.swf' data-ratio='0.4167'>";
echo "<video>";
echo"<source type='video/webm' src='https://edge.flowplayer.org/bauhaus.webm' autoplay='autoplay'>";
echo"<source type='video/mp4' src='https://edge.flowplayer.org/bauhaus.mp4' autoplay='autoplay'>";
echo "</video>";
echo"</div>";
}else{
echo"<img src='echo GW_UPLOADPATH.$row1['file'];' class='img-polaroid' alt='Image' width='550px' height='500px' />";
}
?>
but I;m getting Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) error on echo img line