0
The registration code is this:
<form class="register-form">
<input type="text" placeholder="nome"/>
<input type="password" placeholder="senha"/>
<input type="text" placeholder="email"/>
<button>create</button>
<p class="message">Already registered? <a href="cadastrando.php">Sign In</a></p>
</form>
<form class="login-form">
<input type="text" placeholder="username"/>
<input type="password" placeholder="password"/>
<button>login</button>
<p class="message">Not registered? <a href="#">Create an account</a></p>
</form>
I’ve tried connecting to the database using this command:
<html>
<head>
<title>Cadastrando...</title>
</head>
<body>
<?php
$host = "localhost";
$user = "root";
$pass = "xampp";
$banco = "cadastro";
$conexao = mysql_connect($host, $user, $pass) or die(mysql_errir());
mysql_select_db($banco) or die(mysql_error());
?>
<?php
$nome=$_POST['nome'];
$senha=$_POST['senha'];
$email=$_POST['email'];
$sql = mysql_query("INSERT INTO usuarios(nome, senha, email)
VALUES('$nome', '$senha', '$email')");
?>
</body>
</html>
Being that I created the database every straight q n works out. Can someone help me?
Already got the functions wrong
mysql_
should not be used, use Mysqli or PDO for connection to the bank.– rray