|   |   |   | ||||
| 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. | 
|    | 
| 
 | |||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. | 
|  | Thread Tools | 
|  11-24-2004, 02:24 AM | #1 | 
| Confirmed User Industry Role:  Join Date: Nov 2003 Location: Toronto 
					Posts: 4,001
				 | 
				
				PHP Question = Keeping a Variable
			 Quick question, I am trying to make it so that a variable is kept even when the user clicks to another page. For example: They go to www.yahoo.com?ref=55 and then from yahoo they click news. I want it to then go to: www.yahoo.com/news?ref55 instead of just going to www.yahoo.com/news Hope someone can offer a script for this or an alternative easy to use method. | 
|   |           | 
|  11-24-2004, 02:39 AM | #2 | 
| Confirmed User Join Date: Oct 2003 
					Posts: 3,888
				 | PHP Code: 
			the above code is good for only two 
				__________________  xxxoutsourcing.com ICQ:119936 | Aim:xxxoutsourcing | MSN:msn@ xxxoutsourcing.com | Yahoo:xxxoutsourcing Submitters, Designers, Programmers, Cartoonist, Creative Writers, Video & Photo Editors Convert your Paysite into a cartoon site convert2toons.com | 
|   |           | 
|  11-24-2004, 02:47 AM | #3 | 
| Confirmed User Industry Role:  Join Date: Nov 2003 Location: Toronto 
					Posts: 4,001
				 | Thanks, but I don't think this solves the problem on keeping the variable stored so I can use it on the next page. I am testing out some cookie functions now, I think that is what I needed. | 
|   |           | 
|  11-24-2004, 02:47 AM | #4 | |
| Confirmed User Join Date: Nov 2001 Location: MTL 
					Posts: 5,060
				 | Quote: 
 www.url.com/index.php?id=1234 you can print the variable in your page by using <?=$id?> so just print it in your link... (let's say you want news.php to carry the variable you would use PHP Code: 
			
				__________________ mmm my sig was too big... no more cool animation   but hey still! need php? ICQ: 94586959 | |
|   |           | 
|  11-24-2004, 02:49 AM | #5 | |
| Confirmed User Join Date: Nov 2001 Location: MTL 
					Posts: 5,060
				 | Quote: 
 
				__________________ mmm my sig was too big... no more cool animation   but hey still! need php? ICQ: 94586959 | |
|   |           | 
|  11-24-2004, 02:53 AM | #6 | 
| Damn Right I Kiss Ass! Industry Role:  Join Date: Dec 2003 Location: Cowtown, USA 
					Posts: 32,422
				 | PHP Code: 
			 | 
|   |           | 
|  11-24-2004, 02:55 AM | #7 | 
| Damn Right I Kiss Ass! Industry Role:  Join Date: Dec 2003 Location: Cowtown, USA 
					Posts: 32,422
				 | after you drop the cookie, PHP Code: 
			 | 
|   |           | 
|  11-24-2004, 03:00 AM | #8 | 
| Confirmed User Industry Role:  Join Date: Nov 2003 Location: Toronto 
					Posts: 4,001
				 | PHP Code: 
			 | 
|   |           | 
|  11-24-2004, 03:07 AM | #9 | 
| Confirmed User Industry Role:  Join Date: Nov 2003 Location: Toronto 
					Posts: 4,001
				 | [QUOTE]Originally posted by raulph  [B] PHP Code: 
			Thanks again guys! | 
|   |           | 
|  11-24-2004, 05:29 AM | #10 | 
| Confirmed User Join Date: Apr 2004 Location: Very close to that Jack Daniels bottle.. 
					Posts: 6,341
				 | Try using smarty (smarty.php.net), they have something like $smarty -> assign; | 
|   |           | 
|  11-24-2004, 05:32 AM | #11 | |
| Sofa King Band Join Date: Jul 2002 Location: Outside the box 
					Posts: 29,903
				 | Quote: 
 that's like stepping into a fomula 1 car and asking how to step on the gas. | |
|   |           |