Results 1 to 2 of 2

php/Html, cant figure this out,?

This is a discussion on php/Html, cant figure this out,? within the Programming forums, part of the Web Designing & Development category; echo "<table><tr>": echo "<th><a href="CW1.php?firstselection">Country</a></th></tr>"; if ($QUERY_STRING=='firstselection') {} if ($QUERY_STRING=="secondselection") {} if ($QUERY_STRING=="thirdselection") {} else {} i get The error ...

  1. #1
    Junior Member
    Join Date
    Jan 2008
    Posts
    1

    Default php/Html, cant figure this out,?

    echo "<table><tr>":
    echo "<th><a href="CW1.php?firstselection">Country</a></th></tr>";


    if ($QUERY_STRING=='firstselection')
    {}
    if ($QUERY_STRING=="secondselection")
    {}
    if ($QUERY_STRING=="thirdselection")
    {}
    else
    {}


    i get The error message
    "Parse error: syntax error, unexpected T_STRING, expecting ',' or ';'"
    echo "<th><a href="CW1.php?firstselection">Country</a></th></tr>";
    If i take the quote from "CW1.php?firstselection"

    i then get
    Notice: Undefined variable: QUERY_STRING
    for the if ($QUERY_STRING=='firstselection')
    {}

    not sure what to do

  2. #2
    Senior Member slnet's Avatar
    Join Date
    May 2007
    Location
    Swapna Lokam
    Posts
    413

    Default Re: php/Html, cant figure this out,?

    parse error means a spelling mistake.. or you missed out a little .,": or anything.. so I would like to take a look at the whole file before answering... also if you are projecting this php file from a .tpl (template) file.. and if there is a mistake in that template file, sometimes you will also get a parse error.. i.e. if you are missing out the tpl file or missing something critical from it.. so tell us the site, the file, and if there is a tpl file associated with this .php file.. that too...
    Where from, Why here, Where to..?
    May god bless, who he wishes to bless!!

    ----------------------
    Affordable and reliable hosting at www.marginfreehosting.com