Ver Mensaje Individual
  #2 (permalink)  
Antiguo 19/04/2010, 16:07
DiegoRivera2010
 
Fecha de Ingreso: abril-2010
Mensajes: 50
Antigüedad: 14 años
Puntos: 0
Respuesta: no me guarda en la base de datos

aca la segunda parte

LA CUAL A HACER CLICK EN ENVIAR ME VA A LLEVAR A otratarpunt.php codigo
Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
</head>

<body>
<p>&nbsp;</p>
<p align="center">
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="108" height="28">
    <param name="movie" value="button21.swf" />
    <param name="quality" value="high" />
    <param name="bgcolor" value="#CCCCCC" />
    <embed src="button21.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="108" height="28" bgcolor="#CCCCCC"></embed>
  </object>
</p>


<?php
include ("conexion.php");
$solicitud=$_POST['solicitud'];
$nombre=$_POST['nombre'];
$sexo=$_POST['sexo'];
$cedula=$_POST['cedula'];
$direccion=$_POST['direccion'];
$barrio=$_POST['barrio'];
$telre=$_POST['telre'];
$telcel=$_POST['telcel'];
$correo=$_POST['correo'];
$dia=$_POST['dia'];
$mes=$_POST['mes'];
$ano=$_POST['ano'];
$civil=$_POST['civil'];
$masco=$_POST['masco'];
$tipomasco=$_POST['tipomasco'];
$car=$_POST['car'];
$marcacar=$_POST['marcacar'];
$mot=$_POST['mot'];
$marcamot=$_POST['marcamot'];
$ocupacion=$_POST['ocupacion'];
$lugtraba=$_POST['lugtraba'];
$teltraba=$_POST['teltraba'];
$nombrecon=$_POST['nombrecon'];
$diacon=$_POST['diacon'];
$mescon=$_POST['mescon'];
$anocon=$_POST['anocon'];
$numperso=$_POST['numperso'];
$numhijos=$_POST['numhijos'];
$nombrehijo1=$_POST['nombrehijo1'];
$diahijo1=$_POST['diahijo1'];
$meshijo1=$_POST['meshijo1'];
$anohijo1=$_POST['anohijo1'];
$nombrehijo2=$_POST['nombrehijo2'];
$diahijo2=$_POST['diahijo2'];
$meshijo2=$_POST['meshijo2'];
$anohijo2=$_POST['anohijo2'];
$nombrehijo3=$_POST['nombrehijo3'];
$diahijo3=$_POST['diahijo3'];
$meshijo3=$_POST['meshijo3'];
$anohijo3=$_POST['anohijo3'];


$conexion=mysql_connect("localhost","root") or die ("no c pudo conectar a la base de dato");
mysql_select_db("supermercado");




$link=mysql_query ("INSERT INTO SELECT * FROM table super (solicitud,nombre,sexo,cedula,direccion,barrio,telre,telcel,correo,dia,mes,ano,civil,masco,tipomasco,car,marcacar,mot,marcamot,ocupacion,lugtraba,teltraba,nombrecon,diacon,mescon,anocon,numperso,numhijos,nombrehijo1,diahijo1,meshijo1,anohijo1,nombrehijo2,diahijo2,meshijo2,anohijo2,nombrehijo3,diahijo3,meshijo3,anohijo3) values ('$solicitud','$nombre','$sexo','$cedula','$direccion','$barrio','$telre','$telcel','$correo','$dia','$mes','$ano','$civil','$masco','$tipomasco','$car','$marcacar','$mot','$marcamot','$ocupacion','$lugtraba','$teltraba','$nombrecon','$diacon','$mescon','$anocon','$numperso','$numhijos','$nombrehijo1','$diahijo1','$meshijo1','$anohijo1','$nombrehijo2','$diahijo2','$meshijo2','$anohijo2','$nombrehijo3','$diahijo3','$meshijo3','$anohijo3')",$conexion);


?>
</body>

</html>


Y ESTA LA CONEXION.PHP
Código PHP:
<?php
function Conectarse()
{
   if (!(
$link=mysql_connect("localhost","root","")))
   {
      echo 
"Error conectando a la base de datos.";
      exit();
   }
   if (!
mysql_select_db("supermercado",$link))
   {
      echo 
"Error seleccionando la base de datos.";
      exit();
   }
   return 
$link;
}

$link=Conectarse();
echo 
"Conexión con la base de datos conseguida.<br>";


mysql_close($link); //cierra la conexion
?>
DE ANTE MANO GRACIAS LO Q QUIERO ES QUE EL ME DICE Q SE CONECTO A LA BASE DE DATOS PERO NO ME ALMACENA LOS DATOS EN LA BD GRACIAS POR LA AYUDA