Cita:
Iniciado por andresdzphp Algo así:
Código PHP:
Ver original<?php
//MySQL Database Connect
mysql_connect("localhost", "*******", "*********") or
die("Unable to connect to MySQL");
//get data from form
$email=$_POST['email'];
//Count coincidences on database
$sql = "SELECT COUNT(*) existe FROM pressmails WHERE email='$email'";
//If there are more than 0 coincidences the user is registered
//otherwise not registered
if($reg['existe']){
echo "The user is registered";
} else {
echo "The user is not registered";
}
//Close database connection
prueba tu conexion asi
Código PHP:
Ver original$conexion = mysql_connect("tuServer", "tuUsuariio", "tuPässword") or
die("Unable to connect to MySQL"); if($conexion){
echo "conectado";
}else{
echo "No conectado";
}