OK. I understood now. Thank's

On 13 fév, 20:07, James <james.gp....@gmail.com> 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' variable in your success
> function in your ajax.
>
> success: function(msg)
> {
>     if (msg == '1') window.location.href = window.location.href;  //
> refresh page
>     else alert('You failed');
>
> },
>
> On Feb 13, 8:50 am,phicarre<gam...@bluewin.ch> wrote:
>
> > 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 <a.k.v...@gmail.com> wrote:
>
> > > 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
> > > back and it will be received by Ajax function waiting for it.
>
> > > I 'm doing this way.
>
> > > and also... If you check session on your welcome.php, and only allow
> > > user to continue if the user is validated else redirect back to login
> > > page than it doesnt matter even if user gets to know about your
> > > welcome.php page
>
> > > If I understood your problem properly than this should help you.
>
> > > Thanks :)
>
> > > On Feb 13, 10:30 am,phicarre<gam...@bluewin.ch> wrote:
>
> > > > 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 <rene7...@gmail.com> wrote:
>
> > > > > 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.

Reply via email to