SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Addict einSTein's Avatar
    Join Date
    Aug 2006
    Posts
    276
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Urgent : Error In My Php Code

    PHP Code:
    <a href="home.php?x=acc&user='.$_GET['user'].'">Privacy Policy</a
    the error in this code is its not sending the var $_GET['user'] insted of if i wrote
    PHP Code:
    echo $_GET['user']; 
    the posted user will appear

  2. #2
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,804
    Mentioned
    157 Post(s)
    Tagged
    3 Thread(s)
    your quoting is off
    PHP Code:
    echo '<a href="home.php?x=acc&user="'.$_GET['user'].'">Privacy Policy</a>'
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  3. #3
    SitePoint Addict einSTein's Avatar
    Join Date
    Aug 2006
    Posts
    276
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanx man its workin

  4. #4
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Location
    Whistler, Canada
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by spikeZ View Post
    your quoting is off
    PHP Code:
    echo '<a href="home.php?x=acc&user="'.$_GET['user'].'">Privacy Policy</a>'
    You've got an extra " in the url


    PHP Code:
    echo '<a href="home.php?x=acc&user='.$_GET['user'].'">Privacy Policy</a>'

  5. #5
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,804
    Mentioned
    157 Post(s)
    Tagged
    3 Thread(s)
    good spot IP-Dope
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  6. #6
    SitePoint Guru
    Join Date
    Jul 2004
    Location
    Netherlands
    Posts
    672
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    don't forget to escape your input
    Go visit my site :-D you know you want to ;-)
    www.mech7.net

  7. #7
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think this will also work.
    PHP Code:
    echo "<a href=\"home.php?x=acc&user={$_GET['user']}\">Privacy Policy</a>"
    Just for another way.
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5


Bookmarks

Posting Permissions

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