hago el formulario todo bien pero cuando quiero ver si esta en DB no me sale nada
<html>
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
<title>download</title>
<header>
<h1>
<a href="">
<img alt="" src="img/logo3.png"/>
</a>
</h1>
</header>
<nav>
<ul>
<li><a href="">home</li></a>
<li class="rojo"><a href="">Ecash</li></a>
<li><a href="game.php">Game</li></a>
<li><a href="download.html">Download</li></a>
<li class="amarillo"><a href="">contact us</li></a>
</ul>
</nav>
<body>
<div>
<h1>Formulario de registro</h1>
<hr>
<br><h6>Campo requerido</h6></br>
</hr>
<form method="POST" action="register.php" />
<table>
<tr>
<td>
Name and surname:
</td>
<td>
<input type="name" name="names" />
</td>
</tr>
<tr>
<td>
nick:
</td>
<td>
<input type="name" name="nick" />
</td>
</tr>
<tr>
<td>
password:
</td>
<td>
<input type="password" name="pass" />
</td>
</tr>
<tr>
<td>
repeat password:
</td>
<td>
<input type="password" name="rpass" />
</td>
</tr>
</table>
<input type="submit" name="submit" value="register"/>
<input type="reset" value="reset"/>
</form>
<?php
if(isset($_POST['submit']))
{
require("register.php");
}
?>
</div>
</body>
<footer id="fade2">
<a href="https://www.facebook.com/unity3d"><img src="img/social/Facebook.png" class="facebook" id="fade2"/></a>
<a href="https://twitter.com/"><img src="img/social/twitter.png" class="twitter" id="fade2"/></a>
<a href="https://www.youtube.com/"><img src="img/social/YouTube.png" class="youtube" id="fade2"/></a>
<img src="img/social/vimeo.png" class="youtube" id="fade2"/>
<a href=""><img src="img/social/Pinterest.png" class="pinterest" id="fade2"/></a>
<a href=""><img src="img/social/Tumblr.png" class="tumblr" id="fade2"/></a>
<p>© game</p>
</footer>
</html>
lo del register
<?php
$names = $_POST["names"];
$nick = $_POST["nick"];
$pass = $_POST["pass"];
$pass = $_POST["rpass"];
$reqlen = strlen($nick) * strlen($pass) * strlen($rpass);
if($reqlen > 0)
{
if($pass=$rpass)
{
include("connect_db.php");
pass = md5($pass);
echo 'error';
mysql_query("INSERT INTO register VALUE("","$names","$nick","$pass")");
echo 'se ha registrado good';
mysql_close($link);
}else
{
echo "Introduzca las contraseñas iguales.";
}
}else
{
echo "porfavor, rellene todo los campos requeridos." ;
}
?>
lo de la conexion
<?php
$link = mysql_connect("localhost","root","aaron");
if($link)
{
mysql_select_db("registros",$link);
}
?>
me podria ayudar como hacerle para lo que registro me lo deje en db
mysql_query si mal no recuerdo esa función requiere dos parámetros
$query ="INSERT INTO register VALUE("","$names","$nick","$pass")"
mysql_query($link, $query);
$pass = $_POST["pass"];
$pass = $_POST["rpass"];
Primero asignas a $pass un dato de $_POST y luego vuelves a tomar $pass y le pones otro $_POST. El segundo $pass deberia ser $rpass.
Luego tienes:
if($pass=$rpass)
Deberia ser:
if($pass == $rpass)