The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Redirect after Login code

View previous topic View next topic Go down

Redirect after Login code

Post by skyman101 on July 5th 2014, 10:02 pm

1. So I've got this code for the login box, however I want to make it so after the user clicks login, it takes them to a different page. If they login successfully, it would take them to a page. If it's unsuccessful, it would take them to a different page.

2. Does anyone have a code which shows whether a user is logged in? So it could show 'logout' maybe?



Login box code:

<form action="http://website.forumotion.com/login.forum" method="post"><table cellspacing="1" cellpadding="3" border="0" bgColor="#66cccc" border="0" style="border: 3px solid #7c766b; background-image: url('URL_OF_BACKGROUND_IMAGE'); background-repeat: repeat; background-attachment: fixed;"><tbody><tr><td width="45%" align="right"> Username:</td><td><input type="text" name="username" size="25" maxlength="40" style="BACKGROUND-COLOR: #c6c5af"/></td></tr><tr><td align="right">Password:</td><td><input type="password" name="password" size="25" maxlength="32" style="BACKGROUND-COLOR: #c6c5af"/></td></tr><tr align="center"><td colspan="2">Log me on automatically each visit: <input type="checkbox" name="autologin" checked="true" /></td></tr><tr align="center"><td colspan="2"><input type="submit" class="mainoption" name="login" value="Log in" /></td></tr></tbody></table></form>

skyman101
New Member

Posts : 17
Reputation : 1
Language : English

http://89hello@live.co.uk

Back to top Go down

Re: Redirect after Login code

Post by SSYT on July 6th 2014, 9:40 pm

Try my edit your login box codes Smile
Code:
<form action="/login" method="post" name="login">
   <table cellspacing="1" cellpadding="3" border="0" bgColor="#66cccc" border="0" style="border: 3px solid #7c766b; background-image: url('URL_OF_BACKGROUND_IMAGE'); background-repeat: repeat; background-attachment: fixed;">
      <tbody>
         <tr>
            <td width="45%" align="right"> Username:</td>
            <td><input type="text" name="username" size="25" maxlength="40" style="BACKGROUND-COLOR: #c6c5af"/></td>
         </tr>
         <tr>
            <td align="right">Password:</td>
            <td><input type="password" name="password" size="25" maxlength="32" style="BACKGROUND-COLOR: #c6c5af"/></td>
         </tr>
         <tr align="center">
            <td colspan="2">Log me on automatically each visit: <input type="checkbox" name="autologin" checked="true" /></td>
         </tr>
         <tr align="center">
            <td colspan="2">
            <input type="hidden" name="redirect" value="Your url for redirect" />
            <input type="hidden" name="query" value="" />
            <input type="submit" class="mainoption" name="login" value="Log in" /></td>
         </tr>
      </tbody>
   </table>
</form>

And "Your url for redirect" replace with "/, /forum or /f1-your-forum".

SSYT
Forumember

Male Posts : 37
Reputation : 2
Language : RO-10, EN-3, FR-1
Location : Romania

http://help.forumgratuit.ro/forum

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum