Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP String Input and Interpolation

Status
Not open for further replies.

jmg498

Technical User
Oct 31, 2007
26
US
Hi...

I'm rather new to PHP and have done most programming in Perl. I have a series of PHP scripts that display weather information for any area specified by a 3-letter code.

I am trying to figure out if there is a way I can modify the scripts so that when a user visits a website, they can enter the 3-letter code for the region they're interested in, and then the script will replace the 3-letter code in each of the other scripts that depend on it?

In other words:
1.) User visits website and is prompted to enter location code.
2.) Script takes location code and passes it as a string to the other PHP scripts that depend on it.

Anyone have any ideas?

Thanks so much!
 
I'm not sure I understand the question but,

If you want it to be available in all scripts, you can use a Session variable and refer to it in the other scripts.

You could also include all scripts together, that way the value would be available to them all.



----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top