Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: syntax error

  1. #1
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,649
    Thanks
    1
    Thanked 0 Times in 0 Posts

    syntax error

    I must admit I'm rusty after all these years.
    Getting an error I can't see...
    syntax error, unexpected '<' on line 8

    Code:
    <?php
    $file_name = $_POST["file_name"];
    $video_name = $_POST["video_name"];
    
    if(isset($_POST['video_name'])){
    
    
    <html>
    <head>
    <title><?php echo $video_name ?></title>
    <script type="text/javascript" src="videos/HD/swfobject.js"></script>
    </head>
    <body style="background-color: #000000; text-align:center; margin: auto">
    
    <img style="margin-top: 10px" src="img/dark_alley.jpg">
    
    <div style="margin: 0px auto; cursor:pointer; text-align:center; height: 260px">
    
    <p id="player" style="text-indent: 0px; text-align: center"><a href="http://www.adobe.com/go/getflashplayer" target="_blank"> 
          <u>You must upgrade your Adobe Flash Player to see this video</u></a></p>
          
    <script type="text/javascript">var so = new SWFObject('videos/HD/player.swf','mpl','320','260','9.0.115');
    so.addParam('allowscriptaccess','always');
    so.addParam('allowfullscreen','false');
    so.addParam('flashvars','&file=/videos/mp4/<?php echo $file_name ?>&backcolor=000000&frontcolor=C0C0C0&lightcolor=CC0000&screencolor=000000&controlbar=bottom&stretching=none&autostart=true&link=http://buskeralley.com/&linktarget=_self&bufferlength=2');
    so.write('player');</script>
    
    </div>
    </body>
    </html>
    
    }
    else{
    What did I forget over the years?
    Thx
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #2
    Senior Coder Len Whistler's Avatar
    Join Date
    Jul 2002
    Location
    Vancouver, BC Canada
    Posts
    1,323
    Thanks
    26
    Thanked 100 Times in 100 Posts
    I think you need php closing tag

    PHP Code:
    ?>
    <html> 
    Then php opening tag at the bottom after </html>
    Leonard Whistler

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,649
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Oh that's right...I have to start and stop the php as the page progresses.
    Thanks...Works a charm
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •