|    
			
				22/01/2013, 09:09
			
			
			  | 
  |   |  | Colaborador |  |  Fecha de Ingreso: julio-2011 Ubicación: $this->Colombia; 
						Mensajes: 2.749
					 Antigüedad: 14 años, 3 meses Puntos: 793 |  | 
  |  Respuesta: MySQL query con variables PHP  
  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 
				__________________Si sabemos como leer e interpretar el manual será mucho más fácil aprender PHP. En lugar de confiar en ejemplos o copiar y pegar  - PHP    |