Ver Mensaje Individual
  #7 (permalink)  
Antiguo 23/04/2008, 09:05
Avatar de Eleazan
Eleazan
 
Fecha de Ingreso: abril-2008
Ubicación: Ibiza
Mensajes: 1.879
Antigüedad: 16 años
Puntos: 326
Re: borrado de datos

Código PHP:
if ($_POST["submit"]=="esborra"){ 
$resultat=mysql_query("DELETE  from treballadors WHERE DNI=$DNI",$conexio); 
$files=mysql_affected_rows($conexio);


if (
mysql_errno($conexio)==0){
echo 
"<center><h2> FILES ELIMINADES: $files</h2></center>"
echo 
"<br>";
}


else
$numeroerror=mysql_errno($conexio);
$descripcioerror=mysql_error ($conexio); 
{
echo 
"num_derror $numeroerror";
echo 
'<br>';
echo 
"descripcio $descripcioerror";



acostumbrate a identar el código, y así no tendrás fallos en bulces o condicionales

PD: indentar= poner tabs :D