[jQuery] Re: How to make a secured login form

2009-02-26 Thread phicarre
I found 2 empty lines in a script previously called. This seems to disturb the echo function. On 13 fév, 19:48, James wrote: > Do you want a refresh on the current page when the login is > successful? > Upon successful login, it will refresh your current page > (welcome.php), then the script (we

[jQuery] Re: How to make a secured login form

2009-02-22 Thread phicarre
Strange behaviour: I followed your example and I received "\r\n1" instead of "1" ! My php code begins by " wrote: > Okay, here's a simple way to understand it. Suppose in your login.php, > if the user login is successful, you have login.php echo '1'. If not, > echo something else, like '0'. > > Th

[jQuery] Re: How to make a secured login form

2009-02-17 Thread James
I only used the redirect as a simple example, not as a representation of what's web 2.0 or not. ;) On Feb 14, 3:59 am, EugeneS wrote: > location.href (simply redirection) is so called web 2.0 ? :) > > web 2.0 is like a google mail where no redirection at all and all the > content loaded dynamica

[jQuery] Re: How to make a secured login form

2009-02-16 Thread phicarre
Do you have a skeleton ? On 14 fév, 14:59, EugeneS wrote: > location.href (simply redirection) is so called web 2.0 ? :) > > web 2.0 is like a google mail where no redirection at all and all the > content loaded dynamically. > > simplest realization can look like: > 1) you will have one main scr

[jQuery] Re: How to make a secured login form

2009-02-14 Thread EugeneS
location.href (simply redirection) is so called web 2.0 ? :) web 2.0 is like a google mail where no redirection at all and all the content loaded dynamically. simplest realization can look like: 1) you will have one main script lets name it manager.php to this script you will send different valu

[jQuery] Re: How to make a secured login form

2009-02-14 Thread phicarre
@james: I forgot to answer to your question ... what I want ? "web2.0 style" with a solution as you suggested it On 14 fév, 12:03, phicarre wrote: > OK. I understood now. Thank's > > On 13 fév, 20:07, James wrote: > > > Okay, here's a simple way to understand it. Suppose in your login.php, > >

[jQuery] Re: How to make a secured login form

2009-02-14 Thread phicarre
OK. I understood now. Thank's On 13 fév, 20:07, James wrote: > Okay, here's a simple way to understand it. Suppose in your login.php, > if the user login is successful, you have login.php echo '1'. If not, > echo something else, like '0'. > > This response will become stored in the 'msg' variabl

[jQuery] Re: How to make a secured login form

2009-02-13 Thread James
Okay, here's a simple way to understand it. Suppose in your login.php, if the user login is successful, you have login.php echo '1'. If not, echo something else, like '0'. This response will become stored in the 'msg' variable in your success function in your ajax. success: function(msg) { i

[jQuery] Re: How to make a secured login form

2009-02-13 Thread phicarre
I tried by doing header("Location:welcome.php") but the page is not displayed ??? The first module is waiting for an answer. This is probably that doesn't run ??? Show me how you did it On 13 fév, 19:45, Ashit Vora wrote: > Hey, why dont u redirect to Welcome.php page from the page where u

[jQuery] Re: How to make a secured login form

2009-02-13 Thread James
Do you want a refresh on the current page when the login is successful? Upon successful login, it will refresh your current page (welcome.php), then the script (welcome.php) will see that the user is logged in and will display the welcome screen content rather that the login content. Or would you

[jQuery] Re: How to make a secured login form

2009-02-13 Thread Ashit Vora
Hey, why dont u redirect to Welcome.php page from the page where u r authenticating the user. eg. suppose you make ajax request to auth.php for validation, If validation succeed, redirect to welcome.php (and the ajax request which was waiting for response will die) and if failed, write response b

[jQuery] Re: How to make a secured login form

2009-02-13 Thread phicarre
The question was "How to call welcome.php from my jquery script in a secured manner ?" because welcome.php is visible from the client side. On 13 fév, 13:19, Rene Veerman wrote: > Rene Veerman wrote: > >            //    $pwh = md5 ($users->rec["user_password_hash"] . > > $challenge); > > Ehm, b

[jQuery] Re: How to make a secured login form

2009-02-13 Thread Rene Veerman
Rene Veerman wrote: //$pwh = md5 ($users->rec["user_password_hash"] . $challenge); Ehm, best to use Either sha256 OR md5 for BOTH fields ofcourse ;) It was a hasty paste.

[jQuery] Re: How to make a secured login form

2009-02-13 Thread Rene Veerman
I have secured the login form for my CMS with a challenge-response thing that encrypts both username and password with the (login-attempts-counted) challenge (and; here's my problem: a system hash) sent by the server (it would end up in your html as a hidden inputs, or as part of a json trans

[jQuery] Re: How to make a secured login form

2009-02-13 Thread phicarre
It is a little bit different because with ajax we come back to the first module: data introduction -> send to server -> check -> return to first module -> goto welcome Without ajax/jquery: data introduction -> send to server -> check -> goto welcome On 12 fév, 20:09, James wrote: > Well... if yo

[jQuery] Re: How to make a secured login form

2009-02-12 Thread James
Well... if your module properly checks that the user is logged in then there shouldn't really be a problem, provided you're making sessions properly and not easy to crack. Other than that, if all the checking is done server-side, then your login method is really no different whether you're doing i