Global Variables and PHP

  OK Computer 19:26 26 Feb 2006


I was wondering if someone could help although I'm not sure if what I'm trying to do is possible or not!

I have a HTML form that posts to a PHP script. The form has a text field. I want to take what is entered into the text field, hold it in a variable and make it globally available to all scripts, not just the script I'm posting to. Does that make sense and is it possible?

Thanks in advance!

  harristweed 08:25 27 Feb 2006

You need to create a session and then make the text a session variable.


  OK Computer 19:27 02 Mar 2006

Thanks decided to use cookies in the end but you had me looking in the right direction!

  harristweed 21:11 02 Mar 2006


Sessions are better than cookies because cookies can be blocked by the user in their brouser set-up options. Sessions are far less likely to fail.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

WPA2 hack: How secure is your Wi-Fi?

HP’s new Surface Pro rival is designed specifically for Adobe-using designers and artists

Best kids apps for iPhone & iPad

Que faire si son iPhone ou iPad est tombé dans de l'eau ?