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

Problems with sessions

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Problems with sessions

Postby Georgezx9 » Wed Apr 23, 2014 2:11 pm

Hi I am trying to pass variables between pages, does the session logic only work between the next page called or all pages.

I have a variable on page 1 (actually a column value from SQL query-$result['ID']):
Code: Select all
$_SESSION['thisblogno'] = $result['ID'];

Page 2 does not use the variable but, page 2 calls page 3, where I have:

Code: Select all
$query="INSERT INTO blogs (BlogText,Bloggerid) VALUES ('$text','$thisblogno')";

The code works except the 2nd sql column value is always zero

Grateful for any help.
New php-forum User
New php-forum User
Posts: 9
Joined: Mon Mar 31, 2014 1:15 pm

Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 5 guests

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