Jump to content
Larry Ullman's Book Forums

Recommended Posts

Hi.  I've been using your Chapter 4 login code for a while now and it works well.  

 

But I'd like to make an enhancement.

 

Right now, in the login_form.inc.php, the form code is this:

 

<form action="index.php#loginform" method="post" accept-charset="utf-8">

 

I use the #loginform because I have placed the login div at the bottom of my page.  It needs to take the user back to the bottom of the page if the login is unsuccessful because otherwise they will not see the error messages that the login was unsuccessful.  

 

It works well, EXCEPT that if the user logs in successfully, then they are still stuck at the bottom of the page.  

 

I would like to change it so that if the user logs in successfully, they are taken to the top of the page.  

 

(BTW, you can see the actual site here: www.readinesstest.com)

 

Anyone have a thought on how to accomplish this?  I've tried a handful of things but they didn't work.

 

Thanks!

 

--David

Share this post


Link to post
Share on other sites

Sure thing! Good question here. Just do a redirect (upon successful login) to index.php without the anchor.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...