Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-18-2012, 06:47 AM   PM User | #1
connormcwood
New Coder

 
Join Date: Sep 2011
Location: Blackpool
Posts: 31
Thanks: 6
Thanked 1 Time in 1 Post
connormcwood has a little shameless behaviour in the past
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 08:06 AM.. Reason: resolved
connormcwood is offline   Reply With Quote
Old 07-18-2012, 07:02 AM   PM User | #2
Len Whistler
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
Len Whistler is on a distinguished road
The code below goes in the sendmessage.php page

$username = $_GET['user'];
__________________
Leonard Whistler
Len Whistler is offline   Reply With Quote
Users who have thanked Len Whistler for this post:
connormcwood (07-18-2012)
Old 07-18-2012, 08:04 AM   PM User | #3
connormcwood
New Coder

 
Join Date: Sep 2011
Location: Blackpool
Posts: 31
Thanks: 6
Thanked 1 Time in 1 Post
connormcwood has a little shameless behaviour in the past
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.
connormcwood is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:20 AM.


Advertisement
Log in to turn off these ads.