0

Upon using the following CSS styling for my log in form, My POST variables register as NULL variables upon form submission. Why?

Here is the CSS:

#wrapper #Box input[type=text], textarea, input[type=password] {
border: 1px solid #929292;
color: #929292;
padding: 10px;
vertical-align: text-top;
width: 200px;
-webkit-box-shadow: #e3e3e3 0.1em 0.1em 0.2em;
box-shadow: #e3e3e3 0.1em 0.1em 0.2em;
-moz-box-shadow: #e3e3e3 0.1em 0.1em 0.2em;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-border-radius: 5px;
-khtml-border-radius: 5px;
background: -webkit-gradient(linear, left top, left 25, from(#FFFFFF), color-stop(4%, #EEEEEE), to(#FFFFFF));  
background: -moz-linear-gradient(top, #FFFFFF, #EEEEEE 1px, #FFFFFF 25px); 
bottom: 0;
left: 10px;
}

#wrapper #hottestBox button, input[type=submit] {
border: 1px solid #929292;
color: #505050;
-webkit-box-shadow: #e3e3e3 0.1em 0.1em 0.2em;
box-shadow: #e3e3e3 0.1em 0.1em 0.2em;
-moz-box-shadow: #e3e3e3 0.1em 0.1em 0.2em;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-border-radius: 5px;
-khtml-border-radius: 5px;
background: -webkit-gradient(linear, left top, left 25, from(#FFFFFF), color-stop(4%, #EEEEEE), to(#FFFFFF));  
background: -moz-linear-gradient(top, #FFFFFF, #EEEEEE 1px, #FFFFFF 25px); 
padding: 10px;
}

for this HTML

<div id ='wrapper'>
<div id ='Box'>
        <form action="login.php" method="post">
        Username:
        <input name="username:" type="text"/><br/>
        Password:
        <input name="password:" type="password" /><br/>
        <input name="submit" type="submit" value="Sign In" />
        </form>
    </div>

</div>
0

5 Answers 5

7

why do your name attributes have a : at the end? That is probably part of your problem. This is definitely not CSS related

Sign up to request clarification or add additional context in comments.

2 Comments

It's not part of the problem, it is the problem ;)
Awesome!! someone made a change to the html that I didn't notice! Thanks would never have caught that.
1

Post variables being null has nothing to do with CSS styling.

When trying your snippet, Firebug tells me that both username and password are properly set, so your problem lies elsewhere.

Edit

Seeing other answers: the colon doesn't seem to have an effect of setting post vars to NULL when viewing the request in Firefox. On my server the POST vars are still properly set.

1 Comment

If he's expecting username and password without a : in his php code it will be the problem.
0

It's impossible that CSS affect php. How do you access your post variables? I've noticed that you name your fields with colon (username: and password:) try to remove the colon from the names and print_r the POST array in your login.php

Comments

0

This has indeed nothing to do with the CSS, remove the ':' from the name-property of your controls.

Comments

-1

try

print_r($_POST);

it should help you to solve the problem.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.