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

Posted by Rik on 03/09/07 17:08

Beshoo <basheermoro@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']=3D$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


So, you were in a hurry in typing, weren't you?
When using this kind of thing to login, first consider wether or not thi=
s =

breaks your total page becomes useless without javascript. Create a nice=
=

fallback.

Now, the way you use it, only cookies can be used to hold the session_id=
, =

PHP is not there for you to rewrite GET or POST variables (or you have t=
o =

do it with javscript... messy). I think it might be a security issue, =

where the cookie received by a javascript call is not set/denied by the =
=

browser. Try to:
- check with javascript wether or not the cookie is set after your reque=
st.
- print the session_id to screen
- check the headers that are sent on refresh

-- =

Rik Wasmus
Posted on Usenet, not any forum you might see this in.
Ask Smart Questions: http://tinyurl.com/anel

 

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

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