Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-26-2012, 08:39 PM   PM User | #1
Canman07
New Coder

 
Join Date: Jun 2011
Posts: 65
Thanks: 9
Thanked 0 Times in 0 Posts
Canman07 is an unknown quantity at this point
Login form (BROKE!!!!) - WP

I'm rather new to developing so bare with me. I have implemented a login form on my homepage of my site, however, when I go to login - it doesn't actually allow me to login. The end of my url after i select "LOGIN" says the following: "?username=admin&password=admin&submit=+"

Here is the HTML:
Code:
<div id="navbar">
        <?php wp_nav_menu( array( 'menu' => 'Primary Menu', 'container' => false,'menu_id' => 'main-nav','depth'=>'2')); ?>
            <div id="login" >
        <?php if (!(current_user_can('level_0'))){ ?>               
        <form>
            <input type="text" name="username" id="username" value="<?php echo wp_specialchars(stripslashes($user_login), 1) ?>" style="padding-left: 2px;" onfocus="if(this.value==this.defaultValue) this.value='';" onblur="if(this.value=='') this.value=this.defaultValue;" />
            <input type="password" name="password" id="password" style="padding-left: 2px;" onfocus="if(this.value==this.defaultValue) this.value='';" onblur="if(this.value=='') this.value=this.defaultValue;" />
            <input type="submit" name="submit" value=" " class="loginbutton" />
                </form>
                <a class="helpbutton" href="<?php echo get_option('home'); ?>/wp-login.php?action=lostpassword"></a>
        <?php } else { ?>
        <ul class="admin_box">
                    <li><a href="<?php echo get_option('home'); ?>/wp-admin/">Dashboard</a></li>
                    <li><a href="<?php echo get_option('home'); ?>/wp-admin/post-new.php">Write new Post</a></li>
                    <li><a href="<?php echo get_option('home'); ?>/wp-login.php?action=logout&redirect_to=<?php echo urlencode($_SERVER['REQUEST_URI']) ?>">Log out</a></li>
            </ul>
        <?php }?>
            </div>
        </div>
Here is the CSS:
Code:
/* Login
-----------------------------------------------------------------------------*/
#login {
    background-image:url(images/bluenavbg.png);
    height:39px;
    width: 370px;
    float:right;
    margin-right: 0px;
    margin-top: 0px;
}

form {
    float: left;
    margin-top: 10px;
    margin-left: 20px;
}

input {
    background:url(images/formbg.png);
    width: 117px;
    height: 20px;
    margin-left: 5px;
    border:none;
    margin-left: 3px;
}

.loginbutton {
    height: 20px;
    width: 40px;
    margin-left: 5px;
    background:url(images/loginbutton.png);
}
.helpbutton {
    height: 20px;
    width: 38px;
    margin-right: 10px;
    background:url(images/helpbutton.png);
    margin-top: 10px;
    float: right;
}

#login ul {
    float: left;
    color: white;
    padding-left: 55px;
}

#login li a {
    float: left;
    color: white;
    text-align: center;
}
Canman07 is offline   Reply With Quote
Old 05-26-2012, 09:54 PM   PM User | #2
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
Where you is your form action? How are you processing the form inputs?
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||
_Aerospace_Eng_ is offline   Reply With Quote
Old 05-26-2012, 10:08 PM   PM User | #3
Canman07
New Coder

 
Join Date: Jun 2011
Posts: 65
Thanks: 9
Thanked 0 Times in 0 Posts
Canman07 is an unknown quantity at this point
Is this what you are talking about?

Code:
<form>
            <input type="text" name="username" id="username" value="<?php echo wp_specialchars(stripslashes($user_login), 1) ?>" style="padding-left: 2px;" onfocus="if(this.value==this.defaultValue) this.value='';" onblur="if(this.value=='') this.value=this.defaultValue;" />
            <input type="password" name="password" id="password" style="padding-left: 2px;" onfocus="if(this.value==this.defaultValue) this.value='';" onblur="if(this.value=='') this.value=this.defaultValue;" />
            <input type="submit" name="submit" value=" " class="loginbutton" />
                </form>
Canman07 is offline   Reply With Quote
Old 05-26-2012, 11:20 PM   PM User | #4
Canman07
New Coder

 
Join Date: Jun 2011
Posts: 65
Thanks: 9
Thanked 0 Times in 0 Posts
Canman07 is an unknown quantity at this point
I fixed it, thanks for the help!
Canman07 is offline   Reply With Quote
Old 05-27-2012, 12:36 AM   PM User | #5
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
What did you end up doing?
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||
_Aerospace_Eng_ is offline   Reply With Quote
Old 05-27-2012, 01:20 AM   PM User | #6
Canman07
New Coder

 
Join Date: Jun 2011
Posts: 65
Thanks: 9
Thanked 0 Times in 0 Posts
Canman07 is an unknown quantity at this point
http://stackoverflow.com/questions/1...03265_10769770

However, I have bridged Wordpress with vBulletin and since i've done that, it wont display what is supposed to be displayed after you log in. Is there anyone that can help with this - skype or something?
Canman07 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:54 AM.


Advertisement
Log in to turn off these ads.