www.webdeveloper.com
Results 1 to 6 of 6

Thread: variable in link

  1. #1
    Join Date
    Apr 2012
    Posts
    111

    variable in link

    How do I have the link appear in this link? right now, all it shows is nothing. here is my code:

    Code:
    echo '<a href="?acceptUser="'.$profileLink.'"">Accept

  2. #2
    Join Date
    May 2012
    Posts
    37
    YOu need to close your anchor tag...

    PHP Code:
    echo '<a href="?acceptUser="' $profileLink '">Accept</a>'

  3. #3
    Join Date
    May 2012
    Posts
    5
    same like this

    YOu need to close your anchor tag...

    PHP Code:
    echo '<a href="?acceptUser="' . $profileLink . '">Accept</a>';
    __________________
    "A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools."
    -- Douglas Adams

    http://www.chaoscontrol.org
    Have you minified your CSS/JS lately?
    Reply With Quote Multi-Quote This Message Quick reply to this message

  4. #4
    Join Date
    May 2012
    Posts
    5
    same like this

    YOu need to close your anchor tag...


    PHP Code:
    echo '<a href="?acceptUser="' . $profileLink . '">Accept</a>';

    Online Java/J2ee Springs Training Online

  5. #5
    Join Date
    Jul 2012
    Posts
    32
    Code:
    echo "<a href=\"?acceptUser=$profileLink\">Accept</a>";
    \ Disables PHP For The next Character
    Last edited by iGeekiHackiMatt; 07-16-2012 at 09:52 PM. Reason: Explaining \

  6. #6
    Join Date
    Jan 2009
    Posts
    3,346
    Quote Originally Posted by iGeekiHackiMatt View Post
    Code:
    echo "<a href=\"?acceptUser=$profileLink\">Accept</a>";
    \ Disables PHP For The next Character
    \" used inside a double quoted string (i.e. "I am fancy\" cause I inserted a quote") string when echoing it out will present a double quote (") instead of trying to exit the string and continue execution.

    The concept is called an "escape sequence" officially and there are other characters you can get by using an escape code.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles