Good morning,
I am forming a php form for a raffle. I have connected my form with the database and everything is correct
My problem is that when I register the data that goes to the database are blank:
I pass the connection code as well (it does not have the connection data for security)
if (!$db_connection) {
die('No se ha podido conectar a la base de datos');
}
$subs_email = $_POST['Direccion de Correo'];
$subs_nombre = $_POST['Nombre Completo'];
$subs_facebook = $_POST['Perfil Facebook'];
$resultado=mysql_query("SELECT * FROM ".$db_table_name." WHERE email = '".$subs_email."'", $db_connection);
if (mysql_num_rows($resultado)>0)
{
header('Location: fail.html');
} else {
$insert_value = 'INSERT INTO '' . $db_name . ''.''.$db_table_name.'' ('email' , 'nombre' , 'facebook') VALUES ("' . $subs_email . '", "' . $subs_nombre . '", "' . $subs_facebook . '")';
mysql_select_db($db_name, $db_connection);
$retry_value = mysql_query($insert_value, $db_connection);
if (!$retry_value) {
die('Error: ' . mysql_error());
}
header('Location: sucess.html');
}
mysql_close($db_connection);