redho home | products | services

Programming Forums


Community for Java, PHP, Perl C, ASP and Python programmers
Saturday 17 November 2018 14:04

Ask your IT question here

PHP session variables problem in Firefox



 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Programming Forums -> PHP programming forum
View previous topic :: View next topic  
Author Message
gilbertsavier
New Programmer


Joined: 02 Jul 2009
Posts: 21
Hi,
I have developed a small application for my company on PHP but have some small difficulty to overcome. In fact some session variables are getting vanished mysteriously.
Here is the flow :

index.php->page1.php->page2.php->page3.php

Here are the excerpts from the files.

index.php :

session_start();
session_register("username_session");
session_register("fullname_session");
$_SESSION["username_session"]=<value>
$_SESSION["fullname_session"]=<value>

page1.php :

Nothing related to session or session variables in this page. Just pass on a few form fields to next page.
The form fields are "firstvar" and "secondvar"

page2.php :

session_start();
session_register("firstvar_session");
session_register("secondvar_session");

$_SESSION["firstvar_session"]=$_POST["firstvar"]
$_SESSION["secondvar_session"]=$_POST["secondar"]


page3.php:

I access session variables here

session_start();
echo "username=".$_SESSION["username_session"]."<BR>";
echo "fullname=".$_SESSION["fullname_session"]."<BR>";
echo "firstvar=".$_SESSION["firstvar_session"]."<BR>";
echo "secondvar=".$_SESSION["secondvar_session"]."<BR>";
_________________
Thanks & regards
Lokananth

Live Chat Software By miOOt

Reply with quote
 
heronfisher
New Programmer


Joined: 11 Mar 2010
Posts: 4
Do the POST vars actually return anything on page 2? Also check the name of the second POST: it's secondar and probably should be secondvar.
_________________
acekard 2

Reply with quote
 
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Programming Forums -> PHP programming forum


Dubai Forums - Expat Help | Vegan Forum | Java Programming | 3d Design Resources | 3d Forum | 3D Jobs | 3D Textures | Paris Forum | Europe Forum
Dubai Classifieds | Dubai Property | Jobs in Dubai | Free London Classifieds | Jobs in London UK

High Quality, Custom 3d animation and Web Design solutions Royal Quality Web Hosting Services Vegetarian and Animal Rights news

© 2018 RedHo