Ver Mensaje Individual
  #25 (permalink)  
Antiguo 07/08/2010, 01:56
Dexter_MORGAN
 
Fecha de Ingreso: agosto-2010
Mensajes: 9
Antigüedad: 13 años, 8 meses
Puntos: 0
Respuesta: Codigo PHP no me esta haciendo nada

Cita:
Iniciado por fran86 Ver Mensaje
Mostranos el codigo php despues de agregarle mysql_error().

PD: tambien hay highlight para HTML
Código PHP:
<html>
<head>
<title>Prueba</title>
</head>
<?php


$Conexion
=mysql_connect("localhost","root","") or
  die(
"Problemas en la conexion");
mysql_select_db("hc1",$Conexion) or
die(
"Problemas en la seleccion de la base de datos" mysql_error());
?>
<?
 $Nombre
=$_POST["Nombre"];
 
$Apellido=$_POST["Apellido"];
 
$Domicilio=$_POST["Domicilio"];
 
$Telefono=$_POST["Telefono"];
 
$E_mail=$_POST["E_mail"];
 
$Fecha_inico=$_POST["Fecha_inicio"];
 
$Fecha_fin=$_POST["Fecha_fin"];
 
mysql_query("INSERT INTO cliente(Nombre,Apellido,Pais,Ciudad,Telefono,E_mail) VALUES ('".addslashes($Nombre)."', '".addslashes($Apellido)."', '".addslashes($Domicilio)."', '".addslashes($Telefono)."', '".addslashes($E_mail)."');");  
mysql_query("INSERT INTO Reservacion(Fecha_inico,Fecha_fin) VALUES ('".addslashes($Fecha_inicio)."','".addslashes($Fecha_fin)."');");
$result mysql_query($sql);
if (!
$insertar) {
die(
“Fallo en la insercion de registro en la Base de Datos” mysql_error());
}
mysql_close($conexion);
echo 
"El contacto ha sido agregado satisfactoriamente";
?>