1,105,312 Community Members

How to parsed the link using PHP ?

Member Avatar
jacksantho
Junior Poster
169 posts since Feb 2011
Reputation Points: -3 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

In the address bar, i am getting the clean URL. I want to parsed it out.please
help me out.

http://example.com/folder/test.php?stuid=xx44

Member Avatar
cereal
Posting Virtuoso
1,710 posts since Aug 2007
Reputation Points: 461 [?]
Q&As Helped to Solve: 345 [?]
Skill Endorsements: 44 [?]
 
0
 

You can use parse_url function: http://php.net/manual/en/function.parse-url.php
bye.

Member Avatar
hag++
Posting Whiz in Training
239 posts since Jan 2010
Reputation Points: 24 [?]
Q&As Helped to Solve: 36 [?]
Skill Endorsements: 0 [?]
 
0
 

or you could just use the builtin $_GET array. in your example it would be:

$_GET['stuid'];
Member Avatar
vaultdweller123
Posting Pro
577 posts since Sep 2009
Reputation Points: 32 [?]
Q&As Helped to Solve: 84 [?]
Skill Endorsements: 2 [?]
 
0
 

what do you mean by parsed out? you mean how to get the value? then use @hag++ code, use $_GET

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article