Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

i had this working but now i messed it up parse error

y2kbgy2kbg New
edited December 2006 in Vanilla 1.0 Help
Parse error: syntax error, unexpected T_STRING in /www/ : eval()'d code on line 7 in the code: <?php $vid=""; if (isset($_POST["vids"])) { $vid=($_POST["vids"]); } $scripp1="<p id=\"player1\"><a href=\"\">Get the Flash Player</a> to see this player.</p> <script type=\"text/javascript\"> var FO = { movie:\"files/flvplayer.swf\",width:\"600\",height:\"480\",majorversion:\"7\",build:\"0\",bgcolor:\"#FFFFFF\",flashvars:\"file="; $scripp2="&showdigits=true&autostart=true\"}; UFO.create(FO,\"player1\"); </script>"; echo $scripp1 . $vid . $scripp2; ?>


  • Options
    edited December 2006
  • Options
    You know it'd be much easier to use single quotes to contain your variables and then you wouldnt have to escape all of the html double quotes...?
  • Options
    Try this:
    if (isset($_POST['vids'])) $vid=($_POST['vids']);
    if(strrchr($vid, '?') === FALSE) $vid .= '?';
    else $vid .= '&';
    $scripp1 = <<< EOT
    <p id='player1'><a href=''>Get the Flash Player</a> to see this player.</p>
    <script type='text/javascript'>
    var FO = { movie:'files/flvplayer.swf',width:'600',height:'480',majorversion:'7',build:'0',bgcolor:'#FFFFFF',flashvars:'file={$vid}showdigits=true&autostart=true'};
    echo $scripp1;
  • Options
This discussion has been closed.