Código PHP:
Ver original<?php
include("config.php");
// connect to the mysql server
// select the database
// check if the username is taken
$check = "select id from $table where username = '".$_POST['username']."';";
if (empty($_POST['username'])) { die ("<META HTTP-EQUIV='Refresh' CONTENT='0; URL=register1.php?error=7'>"); }
if ($num_rows != 0) {
die ("<META HTTP-EQUIV='Refresh' CONTENT='0; URL=register1.php?error=1'>"); } else {
// insert the data
$insert = mysql_query("insert into $table values (NULL, '".$_POST['username']."', '".$password2."', '', '0', '".$_POST['name1']."', '".$_POST['email']."', 'images/avatar.jpg', ' ', '0')")
// print a success message
echo "Has sido registrado!<br>";
echo "Ahora puedes <a href=login1.php>loguear</a>";
}
?>
Los espacios que guarda que no tienen nada están porque la bd esta conectada con un juego.