Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

SESSION not sending specific variables

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

SESSION not sending specific variables

Postby bobarino » Wed Jul 16, 2014 11:10 am

In my web pages, I have been sending session variables to other pages fine, until I tried sending a variable that I got from a query in my database.

I use this function to get a stored email address from a database table row (it works fine, I have been able to echo the desired output):
Code: Select all
 $mailer = getUserFieldMan('email', 'username', $userNow);


I then want to store this as a global variable, so I use this session code:
Code: Select all
$_SESSION['theMail'] = $mailer;


var_dump($_SESSION); shows me that it is being stored fine on the current page, but when I get redirected and try calling the variable, it is just NULL. This only doesn't work for when I use variables that I got from a query, but I have interchanged it with just about every other possibility and it works fine. Does anyone know what could be the issue? Thanks for the help!
bobarino
New php-forum User
New php-forum User
 
Posts: 3
Joined: Sat May 10, 2014 11:39 am

Re: SESSION not sending specific variables

Postby bobarino » Wed Jul 16, 2014 12:21 pm

Doesn't matter anymore...I'm going about a different way of doing it. Thanks for looking though :)
bobarino
New php-forum User
New php-forum User
 
Posts: 3
Joined: Sat May 10, 2014 11:39 am


Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron