Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 05-17-2003, 04:10 PM   #1
pornJester
Confirmed User
 
Join Date: Mar 2001
Location: Florida
Posts: 6,138
PHP question...

Forgive me if this sounds unprogrammerly but I'm trying to edit a php template I have. So the question is..

How do I echo a variable in my url string. For example i have...

http://www.foo.com/foo.php?category=apples

I want to display.. Category: Apples ..on the top of the output page (based on what category is displayed in the URL).

Any help would be appreciated. Thanks.
__________________


FreshBucks | Webmaster Vault | GayAW
Trusted Names in Adult.
ICQ 9157.3698
pornJester is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-17-2003, 04:15 PM   #2
Machete_
WINNING!
 
Industry Role:
Join Date: Oct 2002
Posts: 14,579
buy one one Juicylinks books
Machete_ is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-17-2003, 04:32 PM   #3
pornJester
Confirmed User
 
Join Date: Mar 2001
Location: Florida
Posts: 6,138
Quote:
Originally posted by ebus_dk
buy one one Juicylinks books
maybe JL can just look it up for me
__________________


FreshBucks | Webmaster Vault | GayAW
Trusted Names in Adult.
ICQ 9157.3698
pornJester is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-17-2003, 04:34 PM   #4
apscripts
Confirmed User
 
Join Date: Mar 2003
Location: Los Angeles, CA USA
Posts: 204
print $_GET['category'];
__________________
icq5708193

aptgp III -- Build a Blog, an RSS feed, a text TGP, and a thumb TGP all from one installation. Own Comus or AutoGallery? Have APTGP III Installed free for 30 days; no obligations.
apscripts is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-17-2003, 04:39 PM   #5
SilverTab
Confirmed User
 
Join Date: Nov 2001
Location: MTL
Posts: 5,060
Quote:
Originally posted by apscripts
print $_GET['category'];
what he said...

print $category;

might do it also...
__________________
mmm my sig was too big... no more cool animation
but hey still! need php? ICQ: 94586959
SilverTab is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-17-2003, 04:40 PM   #6
apscripts
Confirmed User
 
Join Date: Mar 2003
Location: Los Angeles, CA USA
Posts: 204
If he has register_globals on...but who in the hell uses that shit ass setting? heh
__________________
icq5708193

aptgp III -- Build a Blog, an RSS feed, a text TGP, and a thumb TGP all from one installation. Own Comus or AutoGallery? Have APTGP III Installed free for 30 days; no obligations.
apscripts is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-17-2003, 04:44 PM   #7
senseidru
Confirmed User
 
Join Date: Sep 2002
Location: UKStyle.UKFlow
Posts: 1,767
why do peeps not like register_globals?

Can someone explain to me.
__________________
senseidru is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-17-2003, 04:46 PM   #8
pornJester
Confirmed User
 
Join Date: Mar 2001
Location: Florida
Posts: 6,138
Quote:
Originally posted by apscripts
print $_GET['category'];
This worked. Thanks
__________________


FreshBucks | Webmaster Vault | GayAW
Trusted Names in Adult.
ICQ 9157.3698
pornJester is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-17-2003, 04:49 PM   #9
Nysus
Confirmed User
 
Industry Role:
Join Date: Aug 2001
Posts: 7,817
Hey PornJester,

<?=$category;?>

should work for you, otherwise

<?=$_GET['category'];?>

would work.

Cheers,
Matt
Nysus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-17-2003, 04:51 PM   #10
inthestars
Registered User
 
Join Date: Sep 2002
Location: California
Posts: 2,021
Also, try the forums at PHP-Builder..

http://www.phpbuilder.org
inthestars is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-17-2003, 04:58 PM   #11
Why
MFBA
 
Industry Role:
Join Date: Mar 2003
Location: PNW
Posts: 7,230
i would do

$fruit = $HTTP_GET_VARS['category'];

and then just use $fruit anywhere i would need it. that is if category wasnt working for whatever reason.
Why is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-17-2003, 05:04 PM   #12
SicChild
Confirmed User
 
Join Date: Mar 2003
Posts: 365
Quote:
Originally posted by senseidru
why do peeps not like register_globals?

Can someone explain to me.
It allows people to set malicious variables. For instance, if you have a login script that checks cookies to see if you're logged in then does: if($logged_in hahahaha 1) { do stuff; }, then someone could just go like http://mydomain.com/mypage.php?logged_in=1
SicChild is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-26-2003, 02:57 PM   #13
oxenus
Registered User
 
Join Date: Jun 2002
Location: Inter-home
Posts: 11
Quote:
Originally posted by SicChild


It allows people to set malicious variables. For instance, if you have a login script that checks cookies to see if you're logged in then does: if($logged_in hahahaha 1) { do stuff; }, then someone could just go like http://mydomain.com/mypage.php?logged_in=1
It doesn't depend on register_globals, it depends of programer's qualification. :-)
__________________
http://www.greathotpanty.com/

Check it :-)
oxenus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-26-2003, 03:00 PM   #14
Sphinx
Registered User
 
Join Date: Oct 2001
Posts: 31
http://www.something.com?user=<? "$user" ?>
Sphinx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-26-2003, 03:03 PM   #15
PowerCum
CjOverkill
 
Industry Role:
Join Date: Apr 2003
Location: Woldwide
Posts: 1,328
Quote:
Originally posted by SicChild


It allows people to set malicious variables. For instance, if you have a login script that checks cookies to see if you're logged in then does: if($logged_in hahahaha 1) { do stuff; }, then someone could just go like http://mydomain.com/mypage.php?logged_in=1
Then you get a cookie editor and set the cookie you need to have for logged_in=1 ... that easy...
register globals or not, if the programmer is not good enought you get hacked.
__________________
CjOverkill Traffic Trading Script
Free, secure and fast traffic trading script. Get your copy now
PowerCum is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.