+ Reply to Thread + Post New Thread
Results 1 to 2 of 2

Thread: php/Html, cant figure this out,?

  1. #1
    Senior SEO Specialist Zihad's Avatar
    Join Date
    Apr 2011
    Posts
    1,251
    Thanks
    12
    Thanked 24 Times in 22 Posts

    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
    Join ACP and get Payment Weekly!

  2. #2
    SEO Apprentice
    Join Date
    Aug 2011
    Posts
    14
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default

    I recommend you to use a editor with syntax highlightning and you would see what the problem.
    echo "<th><a href="CW1.php?firstselection">Country</a></th></tr>";
    You see, you use "" around what is echoed. Then you can't use " inside these! Well you can, then you must put a \ before. so it's like this
    echo "<th><a href=\"CW1.php?firstselection\">Country</a></th></tr>";
    Or you could change the outer " to '. or the inner ' to "
    echo '<th><a href="CW1.php?firstselection">Country</a></th></tr>';
    or
    echo "<th><a href='CW1.php?firstselection'>Country</a></th></tr>";

+ Reply to Thread

Tags for this Thread

Posting Permissions

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