Redirect after Login code
2 posters
Page 1 of 1
Redirect after Login code
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>
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>
Re: Redirect after Login code
Try my edit your login box codes
And "Your url for redirect" replace with "/, /forum or /f1-your-forum".
- 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".
Similar topics
» login code redirect
» login not redirect
» Redirect after login
» Redirect to Login
» Redirect on login
» login not redirect
» Redirect after login
» Redirect to Login
» Redirect on login
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum