GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Question about PHP (https://gfy.com/showthread.php?t=132526)

sowned 05-09-2003 02:39 PM

Question about PHP
 
Hello.

How would I go about using PHP to make hosted galleries with codes in it? For example >> http://URL.com?referralID=12345, so that all the links on this page also include the referralID=12345 on the end of it?

Thanks.

Calvinguy 05-09-2003 02:55 PM

The manual is your friend

gornyhuy 05-09-2003 03:32 PM

RTFM

jasonir 05-09-2003 03:35 PM

<a href=http://trageturl.com/page.php?referralID="<? echo $referralID;
?>">

h0st 05-09-2003 03:54 PM

It is not possible with php. try html instead :thumbsup

foe 05-09-2003 03:56 PM

Quote:

Originally posted by jasonir
<a href=http://trageturl.com/page.php?referralID="<? echo $referralID;
?>">

:thumbsup

foe 05-09-2003 03:57 PM

Even better is using a template system and making it all dynamic ..,.. but thas more involved

modF 05-09-2003 04:48 PM

Quote:

Originally posted by jasonir
<a href=http://trageturl.com/page.php?referralID="<? echo $referralID;
?>">


if register_globals is off (as it should be) you will need to pull $referralID from the GET string like this:

PHP Code:

$referralID=$_GET['referralID']; 


Nysus 05-09-2003 04:53 PM

Quote:

Originally posted by modF
if register_globals is off (as it should be) ...
Care to state why you say it should be?..

Cheers,
Matt

vending_machine 05-09-2003 05:16 PM

Quote:

Originally posted by Nysus


Care to state why you say it should be?..

Cheers,
Matt

Security reasons so you can protect your variables. Otherwise people can set malicious variables and do bad stuff. Mkaye? :)

Alky 05-09-2003 05:19 PM

Quote:

Originally posted by Nysus


Care to state why you say it should be?..

Cheers,
Matt

well it shouldnt be, but its better coding using the $GET variable...

and the above code should be:

PHP Code:

<a href="http://trageturl.com/page.php?referralID=<?php echo $referralID?>">


SicChild 05-09-2003 06:00 PM

You could also run some regex on it if you don't want to go through all the links manually. ;)


All times are GMT -7. The time now is 09:49 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123