Basic Hyperlink php help:

Discussion in 'PHP' started by Skillman13, Nov 17, 2009.

  1. #1
    I don't see the problem with this:

    echo "<a href= 'buy.php?" . "&id=". urlencode(2). "'>". Buy Item. "</a>";

    or

    echo "<a href= 'buy.php?" . "&id=2". "'>". Buy Item. "</a>";

    Both give the error:

    Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/mountgam/public_html/zombie/index.php on line 14

    Can someone help please? :) Thanks,

    James
     
    Skillman13, Nov 17, 2009 IP
  2. Skillman13

    Skillman13 Peon

    Messages:
    229
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Works now :) thanks alot (Buy Item needed to be 'Buy Item') =/
     
    Skillman13, Nov 17, 2009 IP