Hi NogDog,
Thanks again for the response - I've had an official response from lunarpages, telling me "sessions are working fine", along with an example of.. you guessed it 'working sessions'... grrr.
so, it HAS to be something I'm doing wrong.. I just can't seem to save a variable to a session and retrieve it after the visitor has clicked through several pages.
I've taken your advice by replacing $REQUEST with $GET - i guess security will be my next phase 🙂
Ok, so those variables will not often be there (only upon a client referral to my site), so if the user has just stumbled upon the site, then the page will simply load as standard (at the moment that will generate an error code, but that's only because I'm trying to test the session variables). Once the page has loaded, the visitor might register their interest for more information on a service, and this data is then sent from the forms to a crm tool (no mysql db as of yet, but may look into this to backup leads).
For example, Tesco sign up to become a referrer client for seoblind.com.
They generate their link (www.seoblind.com/index.php?partner=tesco&name=john) and place it behind an image banner on their site.
A shopper then clicks the button, and is taken to seoblind.com (at this point I'm trying to get the variables $partner & $name to be pulled from the URL, and stored to the visitors session cookie). Once the session variables are set, the parameters in the url don't serve a purpose, as the data is already stored ready for retrieval (i think?).
The shopper clicks around the site (or even leaves the site, visits other sites and comes back to www.seoblind.com/index.php - again, the variables should already be saved for the site in the users cookie). The shopper then lands on a service page where he/she can choose to receive more information/register their interest for that product.
On the service pages (i.e, http://www.seoblind.com/products_services/natural-search-engine-optimisation.php), the "referral-variables.php" page is 'included' to begin with, and a form is used to allow the shopper to enter their data (which is sent to a CRM tool). Two hidden fields are within this form that retrieve the session data from the shoppers session/cookie, and these hidden fields are then assigned to the lead within the CRM tool:
<input type="hidden" name="partner" value="<?php echo $_SESSION['partner']; ?>" />
<input type="hidden" name="name" value="<?php echo $_SESSION['name']; ?>" />
Sorry again for the long winded response. I was hoping that by writing it out in good detail I may have realised something was wrong, but nothing clicked.
Perhaps my understanding of the session variable isn't correct (being able to store data to specific variables, and retrieve this data after multiple page views), but that doesn't explain why it worked perfectly a couple days ago. I MUST have changed something and not realised, but really struggling here! haha
again, appreciate your time and help so far! 🙂
ooh, ps: I was advised to use addslashes incase a persons name or partner name had apostrophies or quotes, etc. ie, "tesco's".. what function would you use in this situation?