Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Sep 2011
    Location
    Blackpool
    Posts
    55
    Thanks
    7
    Thanked 1 Time in 1 Post

    Detect a Variable In a Url

    Hey I don't really know how to explain this but I will try my best. As a user clicks on a link he/she will be directed to the link :
    Code:
    localhost/game/sendmessage.php?user=username
    (Username varys from player to player.)
    I wish to know how I can put this in the sendmessage.php script
    and detect if the user has a value and use it. If you get me?
    Last edited by connormcwood; 07-18-2012 at 09:06 AM. Reason: resolved

  • #2
    Senior Coder Len Whistler's Avatar
    Join Date
    Jul 2002
    Location
    Vancouver, BC Canada
    Posts
    1,323
    Thanks
    26
    Thanked 100 Times in 100 Posts
    The code below goes in the sendmessage.php page

    $username = $_GET['user'];
    Leonard Whistler

  • Users who have thanked Len Whistler for this post:

    connormcwood (07-18-2012)

  • #3
    New Coder
    Join Date
    Sep 2011
    Location
    Blackpool
    Posts
    55
    Thanks
    7
    Thanked 1 Time in 1 Post
    Quote Originally Posted by Len Whistler View Post
    The code below goes in the sendmessage.php page

    $username = $_GET['user'];
    Thank you. Omg, Im such an idiot.


  •  

    Posting Permissions

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