![]() |
![]() |
![]() |
||||
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. |
|
New Webmasters ask "How-To" questions here. This is where other fucking Webmasters help. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Industry Role:
Join Date: Mar 2011
Location: Florida
Posts: 2,040
|
PHP issue
Hey again everyone.
I am hoping someone can help me figure this out. I want to make a variable that i can rename manually per page. I then want to change the url to go here i need it to go based on that variable. Im more of a coldfusion guy and could do this easily, but I am restricted to doing this with php. Here is an example of what I would do in CF incase I am unclear above: Code:
Set the Var in the header file <cfparam name="location" default="home"> Create the link (going to do this with url feeds, but for simplicity ill use an image) <cfoutput><img src="#location#.jpg"></cfoutput> Change the tag in, lets say, contact page: <cfset location="contact" /> Thanks in advance for any help =D |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#2 |
Registered User
Industry Role:
Join Date: Dec 2010
Posts: 85
|
Im not entirely sure that i understand what you are trying to achieve here.
You could set an hidden input on each page, so a post to the php page would make it clear from what page its comming in $_POST['var']. You could put a get var in de url ( either www.mysite.com/index.php?var or something similair ). Only thing you then have to do is filter the desired var and assign its value to a variable in PHP. From there you can you do your php magic. |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: Mar 2011
Location: Florida
Posts: 2,040
|
U know....
After looking at this post again and reading yours, I realize that I am trying to do too much. It doesn't need to be pulled the way I was trying to do it. Thanks for your help, I really appreciate it. |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#4 |
Web Developer
Industry Role:
Join Date: Jan 2011
Location: UK
Posts: 264
|
All you need it to use:
<?php $_GET['var']; ?> This would get the variable from the url so index.php?var=123 would mean the variable returned would have the value of 123 message me if you are unsure Rob |
![]() |
![]() ![]() ![]() ![]() |