PHP Error when I insert a html code.

Discussion in 'PHP' started by Ntech25, May 31, 2010.

  1. #1
    I put this right under my <body> tag in my php file and then it breaks my site something about unexpected ' .. Since its html does it need to be rewritten to work in php. Thanks for your help

    <div style="position:fixed;bottom:0px;right:40px;z-index:1000;" id="divFlashTeaser">
    <script language="javascript">
    if (AC_FL_RunContent == 0) {
    alert("This page requires file AC_RunActiveContent.js.");
    }
    else {
    AC_FL_RunContent(
    'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
    'width', '325',
    'height', '300',
    'src', 'data/vghd',
    'quality', 'high',
    'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
    'align', 'middle',
    'play', 'true',
    'loop', 'true',
    'scale', 'showall',
    'wmode', 'transparent',
    'devicefont', 'false',
    'id', 'vghd',
    'bgcolor', '#ffffff',
    'name', 'vghd',
    'menu', 'true',
    'allowFullScreen', 'false',
    'allowScriptAccess','sameDomain',
    'movie', 'data/vghd',
    'salign', '',
    'FlashVars','sub=YOUR_ID&firstdelay=1000&hideexitbutton=0&id=26&xmlfile=data/vghd.xml'
    );
    }

    function vghd_DoFSCommand(command, args)
    {
    if ( command == "closeflashteaser" ) {
    document.getElementById('divFlashTeaser').style.visibility='hidden';
    }
    if ( command == "showflashteaser" ) {
    document.getElementById('divFlashTeaser').style.visibility='visible';
    }
    }
    </script>

    <noscript>
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="325" height="300" id="vghd" align="middle">
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="allowFullScreen" value="false" />
    <param name="FlashVars" value="sub=YOUR_ID&firstdelay=1000&hideexitbutton=0&id=26&xmlfile=data/vghd.xml" />
    <param name="movie" value="data/vghd.swf" />
    <param name="quality" value="high" />
    <param name="bgcolor" value="#ffffff" />
    <param name="wmode" value="transparent" />
    <embed FlashVars="sub=YOUR_ID&firstdelay=1000&hideexitbutton=0&id=26&xmlfile=data/vghd.xml" src="data/vghd.swf" quality="high" bgcolor="#ffffff" width="325" height="300" name="vghd" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
    </object>
    </noscript>
    </div>
     
    Ntech25, May 31, 2010 IP
  2. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #2
    <?php
    
    echo <<<eof
    <div style="position:fixed;bottom:0px;right:40px;z-index:1000;" id="divFlashTeaser">
    <script language="javascript">
    if (AC_FL_RunContent == 0) {
    alert("This page requires file AC_RunActiveContent.js.");
    }
    else {
    AC_FL_RunContent(
    'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
    'width', '325',
    'height', '300',
    'src', 'data/vghd',
    'quality', 'high',
    'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
    'align', 'middle',
    'play', 'true',
    'loop', 'true',
    'scale', 'showall',
    'wmode', 'transparent',
    'devicefont', 'false',
    'id', 'vghd',
    'bgcolor', '#ffffff',
    'name', 'vghd',
    'menu', 'true',
    'allowFullScreen', 'false',
    'allowScriptAccess','sameDomain',
    'movie', 'data/vghd',
    'salign', '',
    'FlashVars','sub=YOUR_ID&firstdelay=1000&hideexitbutton=0&id=26&xmlfile=data/vghd.xml'
    );
    }
    
    function vghd_DoFSCommand(command, args)
    {
    if ( command == "closeflashteaser" ) {
    document.getElementById('divFlashTeaser').style.visibility='hidden';
    }
    if ( command == "showflashteaser" ) {
    document.getElementById('divFlashTeaser').style.visibility='visible';
    }
    }
    </script>
    
    <noscript>
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="325" height="300" id="vghd" align="middle">
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="allowFullScreen" value="false" />
    <param name="FlashVars" value="sub=YOUR_ID&firstdelay=1000&hideexitbutton=0&id=26&xmlfile=data/vghd.xml" />
    <param name="movie" value="data/vghd.swf" />
    <param name="quality" value="high" />
    <param name="bgcolor" value="#ffffff" />
    <param name="wmode" value="transparent" />
    <embed FlashVars="sub=YOUR_ID&firstdelay=1000&hideexitbutton=0&id=26&xmlfile=data/vghd.xml" src="data/vghd.swf" quality="high" bgcolor="#ffffff" width="325" height="300" name="vghd" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
    </object>
    </noscript>
    </div> 
    eof;
    
    ?>
    PHP:
     
    danx10, May 31, 2010 IP
  3. Ntech25

    Ntech25 Active Member

    Messages:
    372
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    58
    #3
    It gave this error Parse error: syntax error, unexpected T_STRING in /home/sexywall/public_html/skin.php on line 642 and this is line 642 643 if (AC_FL_RunContent == 0) {
    alert("This page requires file AC_RunActiveContent.js.");
     
    Ntech25, May 31, 2010 IP
  4. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #4
    Post the whole contents of skin.php, as your not inserting the code correctly.
     
    danx10, May 31, 2010 IP