Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



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
Trades: 0
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:
Please login or register to view this content. Registration is FREE
Chris_krasnichu is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-06-2004, 03:09 AM
ACJavascript's Avatar
Humble Mod

Posts: 548
Location: CT, USA
Trades: 0
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
__________________

Please login or register to view this content. Registration is FREE
- 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
Trades: 0
I never thought about it that way....
Thanks.
I think i'll be able to get it going.

Chris
__________________
Name: Chris Krasnichuk
Email Address:
Please login or register to view this content. Registration is FREE
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
Trades: 0
$_SERVER['QUERY_STRING']
will get everything after the ? in the URL.
__________________

Please login or register to view this content. Registration is FREE
- Everything a webmaster needs - for free

Please login or register to view this content. Registration is FREE
- Free web hosts reviewed and rated

Please login or register to view this content. Registration is FREE
- Impartial hosting directory - Add your host today for FREE
david is offline
Reply With Quote
View Public Profile
 
Old 01-06-2004, 07:56 PM
Chris_krasnichu's Avatar
Ultra Talker

Posts: 331
Location: Ontario, Canada
Trades: 0
thanks
__________________
Name: Chris Krasnichuk
Email Address:
Please login or register to view this content. Registration is FREE
Chris_krasnichu is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Getting the url thats in the address bar...
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





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



Page generated in 0.99620 seconds with 12 queries