By Szklana on
Hi everyone.
I am trying to put login form into page.tpl.php, well I got almost all but the action form goes kinda weird... Maybe I use bad action but when I enter the username and password it login but with no theme style... or when I used some of tips from handbooks it display me page not found but on place for login form it shows that I am logged in... when i go back to front page and refresh page to see if I am logged in it shows that I am not...
I am using Drupal 5.2
This is the login form code I use:
<?php global $user; ?>
<?php if ($user->uid) : ?>
<span class="login_text">Welcome, </span> <?php print ($user->name); ?> <br>
<?php print l("Your Account",'user/'.$user->uid); ?> |
<?php print l("Log-Out","logout"); ?>
<?php else : ?>
<form action="dr/user" method="post" id="user-login-form">
Username:
<input type="text" maxlength="60" name="name" id="edit-name" size="15" value="" tabindex="1" class="form-text required" />
<br>
Password:
<input type="password" name="pass" id="edit-pass" size="15" tabindex="2" class="form-text required" />
<br>
<input type="submit" name="op" id="edit-submit" value="Log in" tabindex="3" class="form-submit" />
<br>
<a href="/drupal/?q=user/register" title="Create account">Create account</a>
<br>
<a href="/drupal/?q=user/password" title="Retrieve lost password">Retrieve lost password</a>
<input type="hidden" name="form_id" id="edit-user-login" value="user_login" />
</form>
<?php endif; ?>
I know that the action in this code is now bad becouse I was testing many options of it...
I hope you can help me.
Cheers.