Reply
Getting the url thats in the address bar...
Old 01-05-2004, 03:21 PM Getting the url thats in the address bar...
Chris_krasnichu's Avatar
Ultra Talker

Posts: 331
Location: Ontario, Canada
Hello,
I'm needing a way in php to get the url, with the get varables into the script.
Cause I tryed $_SERVER['PHP_SELF'];
but it doesn't get the varables.
Is there another way to do this?

Chris
__________________
Name: Chris Krasnichuk
Email Address: chris.krasnichuk@gmail.com
Chris_krasnichu is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 01-06-2004, 03:09 AM
ACJavascript's Avatar
Humble Mod

Posts: 548
Location: CT, USA
Do you mean for example:

www.yoursite.com/code.php?s=1&np=3

stuff like that?

you can get the variables like so.

$_GET['s'] // equals 1
$_GET['np'] // equals 3

You can also do this

$s //equals 1
$np // equals 3
__________________
CYTech-services.com - 100 Satisfied Customers - Custom Programming and Web Development
ACJavascript is offline
Reply With Quote
View Public Profile Visit ACJavascript's homepage!
 
Old 01-06-2004, 10:12 AM
Chris_krasnichu's Avatar
Ultra Talker

Posts: 331
Location: Ontario, Canada
I never thought about it that way....
Thanks.
I think i'll be able to get it going.

Chris
__________________
Name: Chris Krasnichuk
Email Address: chris.krasnichuk@gmail.com
Chris_krasnichu is offline
Reply With Quote
View Public Profile
 
Old 01-06-2004, 07:27 PM
david's Avatar
King Spam Talker

Posts: 1,314
Location: Glasgow, UK
$_SERVER['QUERY_STRING']
will get everything after the ? in the URL.
__________________
Free Webmaster Help - Everything a webmaster needs - for free
Free-Webhosting.info - Free web hosts reviewed and rated
Web Hosting Hunt - Impartial hosting directory - Add your host today for FREE
david is offline
Reply With Quote
View Public Profile Visit david's homepage!
 
Old 01-06-2004, 07:56 PM
Chris_krasnichu's Avatar
Ultra Talker

Posts: 331
Location: Ontario, Canada
thanks
__________________
Name: Chris Krasnichuk
Email Address: chris.krasnichuk@gmail.com
Chris_krasnichu is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Getting the url thats in the address bar...
 

Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Webmaster Resources Marketplace:
Software Development Company | Webhosting.UK.com | Text Link Brokers 


   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12525 seconds with 12 queries