Что не так с кодом, почему вводимые в поля значения не записываются в бд?
CODE ( htmlphp):
скопировать код в буфер обмена
<?php $host = "localhost"; $user = "root"; $db = "imcody"; if(isset($_POST['submit'])){ $full_name = $_POST['full_name']; $email = $_POST['email']; $password = $_POST['password']; $repeat = $_POST['repeat']; if($password == $repeat){ $password=md5($password); $query = mysql_query($db, "INSERT INTO user (full_name, email, password) VALUES (0,'".$_POST['full_name']."','".$_POST['email']."','".$_POST['password']."')") or die(mysql_error()); }else{ die('Password must match!'); } } ?> <form action="registration.php" method="post" style='margin: auto; width: 300px;'> <ul> <li> <input type="text" name="full_name" placeholder=" | Full name" required style=" marging-buttom:10px; height:25px; width: 300px" /></li> <li><input type="text" name="email" placeholder=" | Email" requred style="height:25px; width: 300px" /></li> <li><input type="password" name="password" placeholder=" | Password" required style="height:25px; width: 300px" /></li> <li><input type="password" name="repeat" placeholder=" | Repeat password" required style="height:25px; width: 300px" /></li> <li><input type="submit" name="submit" value="Ok ✌" class="button" style=" margin: auto; width: 220px; padding:20px 20px; " /></li> </ul> </form>
|