I'm facing a strange problem here with this custom login form:
<form name="loginformfooter" class="loginform" id="loginformfooter" action="<?php bloginfo('url'); ?>/wp-login.php" method="post">
<input type="text" name="log" id="user_login" class="input" tabindex="1" />
<input type="password" name="pwd" id="user_pass" class="input" tabindex="2" />
<input type="submit" name="wp-submit" id="wp-submit" value="Login" />
<input type="hidden" name="redirect_to" value="http://<?=$_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];?>" />
<input type="hidden" name="testcookie" value="1" />
</form>
The most of the times it redirect me to the correct page, but few other times, especially at first login, it redirects me to the admin page. I'm not able to determine precisely when the problem occours.
Does anyone found a problem like that? Or is there a better solution to get the same result?
Thanks!
