Ver Mensaje Individual
  #1 (permalink)  
Antiguo 31/10/2009, 02:29
satic77
 
Fecha de Ingreso: octubre-2009
Mensajes: 25
Antigüedad: 14 años, 6 meses
Puntos: 0
AYUDA borrar registro

hola tengo un problema que no soy capaz de solucionar
a ver si alguien me echa un cable
tengo este formulario por un lado


<html>
<head>
<title>borrar registros</title>
</head>
<body bgclor = "#303030">
<body text = "#E5E5E5">
<font face = "tahoma">
<font size = "2">
<body link = "#E5E5E5" vlink ="E0E0E0">
<p align = "center">
<strong>
<h3>
Formulario borrar registros
</h3>
</strong>
<hr size = "6" color = "ffffff" width ="100%" align = "left">
<form name="form" action= "borraregistro.php"
method="post">
<h5>
indique el numero de telefono del registro a borrar:
<input name="modelo" type="text" size="50">
</h5>
<h5>
<input name="enviar" type="submit" value= "enviar">
</h5>
</form>
</body>
</html>

y este php por otro para procesar el formulario
borraregistro.php
<?php
$telefono=$_POST['telefono'];

$host="localhost";
$user="myuser";
$password="mypass";
$connect=mysql_connect($host,$user,$password);
if(! $connect)
{
echo "<h2 align='center'>ERROR:imposible establecer conexion con el servidor</h2>";
exit;
}
mysql_select_db("registro", $connect);
$result = mysql_query("DELETE * FROM usuarios WHERE telefono='".$telefono."'", $connect);
?>


//original probado
//$result = mysql_query ("delete * usuarios where telefono=
// '$telefono' ", $connect);

bien el problema es que en el formulario le indico el telefono
para que borre el registro pero no me borra nada.

gracias de antemano

un saludo

Última edición por satic77; 31/10/2009 a las 04:55