You are here: Re: ajax session php « PHP Programming Language « IT news, forums, messages
Re: ajax session php

Posted by Satya on 03/10/07 14:10

On Mar 9, 1:19 pm, dschr...@gmail.com wrote:
> On Mar 9, 8:55 am, "Beshoo" <basheerm...@gmail.com> wrote:
>
>
>
> > hey gaiz plz I want to cerate log in system in ajax i do it but i have
> > one problem
>
> > AFTER I start thes session then press refresh key the session gone !!!
> > in other words , after the user type hid username and password I send
> > this information by XMLrequest to php file which verify the user name
> > and the password if trure open the sesstion and get it name 'user' its
> > become like this
>
> > $_SESSION['user']=$user;
>
> > actually after i open the sesstion_start();
>
> > BUT THE PROBLEM IS WHN I PRESS F5 "refresh the page the sesssion is
> > gone
>
> > ANY WAY OUT PLZ :)
>
> > alot of htanx in advance
>
> Make sure session_start() is at the top of every file.
> Try setting the php ini setting to use cookies for sessions, and make
> the session lifetime greater.
> should work.

I assume it is not session but the page refresh in Ajax.
When you refresh a page in ajax all data is be lost.
For this you should use login without Ajax. After login you can use
Ajax for another things.
And remember at the first page also from where you are using ajax, use
session_start();

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация