Global Variables and PHP

  OK Computer 19:26 26 Feb 06


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 06

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


  OK Computer 19:27 02 Mar 06

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

  harristweed 21:11 02 Mar 06


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.

Surface Pro (2017) vs Surface Pro 4

20 groundbreaking 3D animation techniques

How to mine Bitcoin on Mac