Tema: ayuda en php
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/01/2006, 18:15
oscareduardodelgado
 
Fecha de Ingreso: enero-2006
Mensajes: 47
Antigüedad: 18 años, 3 meses
Puntos: 1
ayuda en php

Necesito por favor que alguien que sepa php me colabore con una duda
Código PHP:
<?
//intente esto 

//$enviar = $_POST ["enviar"];
  //$id_cliente =$_["id_cliente"];
 //$nombre_cliente =$_POST["nombre_cliente"];
 //$telefono =$_POST["telefono"];
 //$direccion =$_POST["direccion"];
 //$correo =$_POST["correo"];
 //$ciudad =$_POST["ciudad"];
 //$departamento=$_POST["departamento"];
  
   
if (isset($enviar))
       {
         
                 
//intente esto tambien
                 
isset($id_cliente);
         isset(
$nombre_cliente);
         isset(
$telefono);
         isset(
$direccion);
         isset(
$correo);
         isset(
$ciudad);
         isset(
$departamento); 
         
       
$link mysql_connect("localhost""root","");
               
mysql_select_db("distrivenus",$link);
       
$sql "INSERT INTO cliente (id_cliente,nombre_cliente,telefono,direccion,correo,ciudad,departamento) ".
     
"VALUES ('$id_cliente','$nombre_cliente','$telefono','$direccion','$correo','$ciudad','$departamento')";
       
$result mysql_query($sql);
       echo 
"¡Gracias! Hemos recibido sus datos.\n"
       
        
       
              }
 
?>

<form method="POST" action="clientes.php"> 
<table bgcolor="#E9FFFF" align=center border=2> 
<table width="444" height="240" border=2 align=center bordercolor="#66FF33" bgcolor="#003399"> 
      
      <td width="188" align="right"><font color="#FFFFFF"><strong>Cedula o Nit de cliente</strong> </font><font color="#000000">: </font></td> 
      <td width="231" align="left"> <input type="text" name="id_cliente" onkeyup = fn(this.form,this) value="" size=40 onKeyPress="return acceptNum(event)"></td>
      <tr><td align="right"><font color="#FFFFFF"><strong>Nombre : </strong></font></td> 
      <td align="left"> <input type="text" name="nombre_cliente" onkeyup=fn(this.form,this) value="" size=40></td>
      <tr><td align="right"><font color="#FFFFFF"><strong>Teléfono :</strong></font> </td> 
      <td align="left"> <input type="text" name="telefono" onkeyup=fn(this.form,this) value="" size=40 onKeyPress="return acceptNum(event)"></td>
      <tr><td align="right"><font color="#FFFFFF"><strong>Direccion</strong>:</font> </td> 
      <td align="left"> <input type="text" name="direccion" onkeyup=fn(this.form,this) value="" size=40></td>
      <tr><td align="right"><font color="#FFFFFF"><strong>correo electronico:</strong></font> </td> 
      <td align="left"> <input type="text" name="correo" onkeyup=fn(this.form,this) value="" size=40></td>
      <tr><td align="right"><font color="#FFFFFF"><strong>Ciudad:</strong></font> </td> 
      <td align="left"> <input type="text" name="ciudad" onkeyup=fn(this.form,this) value="" size=40></td>
      <tr><td align="right"><font color="#FFFFFF"><strong>Departamento: </strong></font></td> 
      <td align="left"> <input type="text" name="departamento" onkeyup=fn(this.form,this) value="" size=40></td><tr align="center" valign="middle" background="file:///D|/Archivos de programa/EasyPHP1-8/www/Arrastre a un archivo para elegirlo."> 
        <td height="32" background="Arrastre a un archivo para elegirlo."><input  type="Button" name= "enviar" onClick= " Validar(this.form) " value= "procesar"></td>
        <td background="Arrastre a un archivo para elegirlo."><input type=reset value="Borrar"></td> 
</table>
<p>&nbsp;</p>
</form>

    
</body>
</html>


estoy intentando mil y una formas y no consigo ingresar losa datos ami tabla, me gusatria que me diheran cual es el error..gracias

Última edición por jam1138; 06/01/2006 a las 04:10