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 03-22-2004, 06:32 PM   #1
yoyo2
Registered User
 
Join Date: Oct 2003
Posts: 9
help passing php variables

I need help in trying to pass php variables from page to page, so that I know how my different advertising campaigns are doing?? Im new to php and don't know how to do this...thanks
yoyo2 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2004, 06:33 PM   #2
StuartD
Sofa King Band
 
StuartD's Avatar
 
Join Date: Jul 2002
Location: Outside the box
Posts: 29,903
www.php.net
StuartD is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2004, 06:51 PM   #3
BadBrad
Confirmed User
 
Join Date: Feb 2004
Location: Seattle
Posts: 618
Do you mind passing these via the URL or is this something you don't want shown?
__________________
Your sig chose me!
BadBrad is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2004, 06:52 PM   #4
JamesDotCom
Registered User
 
Join Date: Mar 2004
Location: UK
Posts: 35
Not sure exactly what you are trying to achieve but it may be something like this. You have many different pages pointing one place and want to see where the hits are coming from? If so, this example might give you a rough idea.

Many pages:

<a href="http://this.is.my/single/page.php?referrer=here">Link 1</a>

<a href="http://this.is.my/single/page.php?referrer=there">Link 1</a>


The one page:

<pre>
&lt;?php
if ($_GET["referrer"])
{
echo "Referrer: ".$_GET["referrer"];
}
else
{
echo "Came without a referral";
}
?>
</pre>
Normally from within the if statement you would store the value in a database etc for future reference. Let me know if you need anymore help.

JamesDotCom is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2004, 08:38 PM   #5
yoyo2
Registered User
 
Join Date: Oct 2003
Posts: 9
I actually want to pass them through the url...Here is what im trying to do: I have say 3 different advertisements pages (one.html?yahoo one.html?tgp one.html?linklist) and all of them will be advertising the same site..i just want to know how to pass on these variables through the sites tour until they hit the signup button? thanks guys
yoyo2 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2004, 09:05 PM   #6
AvanteGuard
Confirmed User
 
Join Date: Jan 2004
Location: Cortland, OH
Posts: 451
here's what i would do....

To get this:

tour1.php?from=yahoo
tour2.php?from=yahoo
tour3.php?from=yahoo

on the forms do this:

<a href='tour2.php?from=$from'>Next</a>
<a href='tour3.php?from=$from'>Next</a>
<a href='signup.php?from=$from'>Signup</a>

**EDIT**
PHP Code:
<a href='tour2.php?from=$from'>Next</a>
<
a href='tour3.php?from=$from'>Next</a>
<
a href='signup.php?from=$from'>Signup</a
**/EDIT**

Or at least that's what I would do...you could try playing with cookies, but I wouldn't recommend it (but you could do it if you were trying to hide the "from=yahoo" part.

Let me know if that works for you!
__________________
Looking for Fast Professional Programming? http://www.imadigan.com
ICQ: 314-942-262 | MSN/Email: [email protected]

Last edited by AvanteGuard; 03-22-2004 at 09:07 PM..
AvanteGuard is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2004, 09:11 PM   #7
slackologist
Confirmed User
 
Join Date: Jul 2002
Location: Earth
Posts: 2,379
What JamesDotCom said. There are other ways but that is nice and easy.
slackologist is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2004, 09:17 PM   #8
rickholio
Confirmed User
 
Industry Role:
Join Date: Jan 2004
Location: Nor'easterland
Posts: 1,914
Another option is to make use of sessions, which is specifically designed to track persistant data across requests to the same site (you didn't specify if the data had to be passed across multiple domains, or just different pages on the same domain)

http://www.php.net/manual/en/ref.session.php

should get you pointed in the right direction.
rickholio is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-22-2004, 09:42 PM   #9
yoyo2
Registered User
 
Join Date: Oct 2003
Posts: 9
I will need it for both...alot of my tgp galls will be on a different server than my paysite. So I will need to track this variable from my tgp.html?one over to my paysite and then through the tour pages to my signup page...just looking for something simple that works good. Do i need to change my php.ini? or do i just add this php code in my pages? thanks again
yoyo2 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-23-2004, 01:25 AM   #10
Ash@phpFX
Confirmed User
 
Join Date: Nov 2003
Posts: 4,292
can someone clue me in on how to do

xxx.html?something

rather than xxx.html?var=something


ive seen it used a lot but never used it myself.

thanks in advance
Ash@phpFX is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-23-2004, 01:34 PM   #11
yoyo2
Registered User
 
Join Date: Oct 2003
Posts: 9
bump......would also like to know how to do this: index.html?yahoo


thanks again
yoyo2 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.