V
V
Valery Zinchenko2015-11-16 14:55:06
PHP
Valery Zinchenko, 2015-11-16 14:55:06

Submitting an html form - Why is the data not being submitted?

The code:

<?
$login = "<div id=\"login-form\">
        <fieldset>
           <form action=\"\" method=\"POST\">
                <input name=\"login\" type=\"text\" required value=\"Логин\" onBlur=\"if(this.value=='')this.value='Логин'\" onFocus=\"if(this.value=='Логин')this.value='' \">
                <input name=\"pass\" type=\"password\" required value=\"Пароль\" onBlur=\"if(this.value=='')this.value='Пароль'\" onFocus=\"if(this.value=='Пароль')this.value='' \">
                <input name\"submit\" value=\"Войти\" type=\"submit\" onclick=\"onlick()\">
                <footer class=\"clearfix\">
                    <p><span class=\"info\">?</span><a href=\"#\">Забыли пароль?</a></p>
                </footer>
            </form>
        </fieldset>
    </div>
    ";
    
    
    echo $login;
    
    if ($_POST['submit']) {
  echo "12313";
}
?>

CSS:
@charset "utf-8";
/* CSS Document */

/* ---------- GENERAL ---------- */
a {
  color: #999;
  text-decoration: none;
}

a:hover { color: #1dabb8; }

fieldset {
  border: none;
  margin: 0;
}

input {
  border: none;
  font-family: inherit;
  font-size: inherit;
  margin: 0;
  outline: none;
  -webkit-appearance: none;
}

input[type="submit"] { cursor: pointer; }

.clearfix { *zoom: 1; }
.clearfix:before, .clearfix:after {
  content: "";
  display: table;	
}
.clearfix:after { clear: both; }

/* ---------- LOGIN-FORM ---------- */

#login-form {
  width: 251px;
  
}

#login-form fieldset {
  background: #fff;
  border-radius: 0 0 5px 5px;
  position: relative;
}

#login-form fieldset:before {
  background-color: #fff;
  content: "";
  height: 8px;

  margin: -4px 0 0 -4px;
  position: absolute;
  top: 0;
  -webkit-transform: rotate(45deg);
  -moz-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  -o-transform: rotate(45deg);
  transform: rotate(45deg);
  width: 8px;
}

#login-form input {
  font-size: 14px;
}

#login-form input[type="text"],
#login-form input[type="password"] {
  border: 1px solid #dcdcdc;
  padding: 12px 10px;
  width: 238px;
}

#login-form input[type="text"] {
  border-radius: 3px 3px 0 0;
}

#login-form input[type="password"] {
  border-top: none;
  border-radius: 0px 0px 3px 3px;
}

#login-form input[type="submit"] {
  background: #1dabb8;
  border-radius: 3px;
  color: #fff;
  float: right;
  font-weight: bold;
  margin-top: 20px;
  padding: 12px 20px;
  margin-right: 15px;
}

#login-form input[type="submit"]:hover { background: #198d98; }

#login-form footer {
  font-size: 12px;
  margin-top: 16px;
}

.info {
  background: #e5e5e5;
  border-radius: 50%;
  display: inline-block;
  height: 20px;
  line-height: 20px;
  margin: 0 10px 0 0;
  text-align: center;
  width: 20px;
}

Why is MY code not working, everything seems to be correct, what's the problem? Full code: https://yadi.sk/d/b8GMMyGxkVN7K

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail, 2015-11-16
Chirskiy @chirskiy_mixail

Do you have an onclick event, does it override by any chance?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question