Tema: Ayuda
Ver Mensaje Individual
  #3 (permalink)  
Antiguo 20/11/2007, 15:53
sdiaz1983
 
Fecha de Ingreso: noviembre-2007
Mensajes: 9
Antigüedad: 16 años, 5 meses
Puntos: 0
Re: Ayuda

De antemano con respecto al trabajo ya me toco dejarlo asi pero igual quiero aprender como se hace, mi problema es que no em conecta con la base de datos de postgres:

LIBRERIA CONEX

<?php
function Conectarse()
{
if (!($link=pg_connect("host=localhost dbname=calzar user=postgres password=estudiante port=5432")))
{
echo "Error conectando a la base de datos.";
exit();
}
return $link;
}
?>

LIBRERIA GREGISTRO1

<?php
include("conex.php");
$link=Conectarse();
extract($_POST);
$sql="insert into clientes(IDENTIFICACION,NOMBRE,APELLIDO,DIRECCION, TELEFONO,EMAIL,LOGIN,PASSWORD)
values('$IDENTIFICACION','$NOMBRE','$APELLIDO','$D IRECCION','$TELEFONO','$EMAIL','$LOGIN','$PASSWORD ')";
pg_query($link,$sql);
Header("Location:../principal.php");
?>

FORMULARIO


<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>REGISTRO NUEVO CLIENTE::: CALZADO CALZAR S.A.</title>
<style type="text/css">
<!--
#Dv1 {
position:absolute;
left:287px;
top:261px;
width:674px;
height:768px;
z-index:1;
}
body {
background-color: #FFFFFF;
background-image: url(fondos/bg92.gif);
}
.Estilo6 {color: #FFFFFF; font-weight: bold; font-size: 18px; }
.Estilo8 {color: #FFFFFF}
.Estilo9 {color: #FFFFFF; font-weight: bold; font-size: 20px; }
.Estilo11 {
font-size: 16px;
font-weight: bold;
}
.Estilo19 {color: #FFFFFF; font-weight: bold; font-size: 16px; }
a:link {
text-decoration: none;
color: #FFFF64;
}
a:visited {
text-decoration: none;
color: #FFFF64;
}
a:hover {
text-decoration: underline;
}
a:active {
text-decoration: none;
}
.Estilo20 {
color: #FF0000;
font-weight: bold;
font-size: 20px;
font-style: italic;
}
.Estilo24 {color: #FFFFCC; font-weight: bold; font-size: 20px; font-family: Arial, Helvetica, sans-serif; }
.Estilo27 {color: #FFFFCC; font-style: italic; }
.Estilo30 {color: #FF0000}
.Estilo31 {color: #00FFFF}
.Estilo34 {
font-size: 20px;
color: #FF0000;
}
.Estilo35 {color: #FF0000; font-size: 18px; }
.Estilo39 {color: #FF0000; font-family: "Century Gothic", "Comic Sans MS"; font-weight: bold; }
.Estilo40 {font-size: 22px; color: #FF0000; font-weight: bold; }
.Estilo41 {
font-family: "Century Gothic", "Comic Sans MS";
color: #FF0000;
}
-->
</style>
</head>

<body>
<div align="center"><p><img src="fondos/01-01-0016_1.jpg" width="147" height="110" /><img name="TITULO" src="fondos/TITULO.gif" width="447" height="109" border="0" id="TITULO" alt="" /><img src="fondos/01-03-0006_2.jpg" width="185" height="110" /></p>
<p align="right"><img src="fondos/franja 1.jpg" width="281" height="17" border="0" usemap="#Map" />
<map name="Map" id="Map"><area shape="rect" coords="3,1,155,15" href="HISTORIA.php" alt="HISTORIA" />
<area shape="rect" coords="158,1,275,13" href="UBICACION.php" alt="UBICACION" />
</map></p>
</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table width="250" height="163" border="1" bordercolor="#FFFFFF" bgcolor="#990000">
<tr>
<td width="233" height="53" align="right"><div align="center" class="Estilo6">CALZADO PARA DAMA </div></td>
</tr>
<tr>
<td height="50"><div align="center" class="Estilo6"><a href="DAMA CASUAL.php">CASUAL</a></div></td>
</tr>
<tr>
<td height="50"><div align="center" class="Estilo6"><a href="DAMA DEPORTIVA.php">DEPORTIVO</a></div></td>
</tr>
</table>
<p>&nbsp;</p>
<table width="250" height="163" border="1" bordercolor="#FFFFFF" bgcolor="#990000">
<tr>
<td width="229" height="49" align="right"><div align="center" class="Estilo6">CALZADO PARA CABALLERO </div></td>
</tr>
<tr>
<td height="50"><div align="center" class="Estilo6"><a href="HOMBRE CASUAL.php">CASUAL</a></div></td>
</tr>
<tr>
<td height="50"><div align="center" class="Estilo6"><a href="HOMBRE DEPORTIVO.php">DEPORTIVO</a></div></td>
</tr>
</table>
<div align="center" id="Dv1">
<p class="Estilo34">&nbsp;</p>
<p class="Estilo40">FORMULARIO DE REGISTRO </p>
<form id="form2" name="form2" method="post" action="librerias/gregistro1.php">
<p align="justify"><span class="Estilo41">Llena el siguiente formulario y comienza a formar parte de la familia CALZAR S.A., Bienvenido. </span></p>
<p>&nbsp;</p>
<table width="616" border="1">
<tr>
<td width="299"><div align="left"><span class="Estilo39">IDENTIFICACION</span></div></td>
<td width="301"><label>
<input name="identificacion" type="text" id="identificacion" size="40" />
</label></td>
</tr>
<tr>
<td><div align="left"><span class="Estilo39">NOMBRE</span></div></td>
<td><label>
<input name="nombre" type="text" id="nombre" size="40" />
</label></td>
</tr>
<tr>
<td><div align="left"><span class="Estilo39">DIRECCION</span></div></td>
<td><label>
<input name="direccion" type="text" id="direccion" size="40" />
</label></td>
</tr>
<tr>
<td><div align="left"><span class="Estilo39">TELEFONO</span></div></td>
<td><label>
<input name="telefono" type="text" id="telefono" size="40" />
</label></td>
</tr>
<tr>
<td><div align="left"><span class="Estilo39">EMAIL</span></div></td>
<td><label>
<input name="email" type="text" id="email" size="40" />
</label></td>
</tr>
<tr>
<td><div align="left"><span class="Estilo39">LOGIN</span></div></td>
<td><label>
<input name="login" type="text" id="login" size="40" />
</label></td>
</tr>
<tr>
<td><div align="left"><span class="Estilo39">PASSWORD</span></div></td>
<td><label>
<input name="password" type="password" id="password" size="40" />
</label></td>
</tr>
</table>
<p>
<label>
<input type="submit" name="Submit2" value="ENVIAR" />
</label>
</p>
<p align="justify" class="Estilo35">&nbsp;</p>
<p align="justify" class="Estilo35">&nbsp;</p>
<p align="justify" class="Estilo35">&nbsp;</p>
<p class="Estilo30">&nbsp;</p>
<p align="left" class="Estilo30">
<label></label>
</p>
<p class="Estilo30">&nbsp;</p>
</form>
<h2 align="left" class="Estilo30">&nbsp;</h2>
<p class="Estilo30">&nbsp;</p>
<p class="Estilo30">&nbsp;</p>
<p align="justify" class="Estilo30">&nbsp;</p>
</div>
<div align="right"></div>
<p align="right">&nbsp;</p>
<form id="form1" name="form1" method="post" action="">
<table width="250" height="233" border="1" bordercolor="#FFFFFF" bgcolor="#990000">
<tr>
<td width="240" height="49" align="right"><div align="center" class="Estilo9">ZONA DE INGRESO </div></td>
</tr>
<tr>
<td width="240" height="50"><span class="Estilo8">
<label></label>
</span> <label>
<div align="right"><span class="Estilo19">LOGIN</span>
<input name="textfield" type="text" id="textfield" size="20" />
</div>
</label></td>
</tr>
<tr>
<td width="240" height="66"><span class="Estilo8">
<label></label>
</span><span class="Estilo8">
<label> </label>
</span>
<label><div align="left">
<div align="right"><span class="Estilo8"><span class="Estilo11">PASSWORD</span>
<input name="textfield2" type="password" size="20" />
</span></div>
</div>
</label>
<span class="Estilo8">
<label>
<div align="center"> <br />
<input type="submit" name="Submit" value="INGRESAR" />
</div></label>
</span></td>
</tr>
</table>
</form>
<p class="Estilo24"><a href="REGISTRO.php" class="Estilo31">REGISTRESE</a></p>
<p>&nbsp;</p>
<p align="center" class="Estilo20">CALZAR S.A. VIDA PARA SUS PIES</p>
<p align="center" class="Estilo20">TEL: 6889966 - 3508904587 </p>
<p align="center" class="Estilo9"><span class="Estilo27"><a href="mailto:[email protected]">CONTACTENOS</a></span></p>
<p align="center"><img src="animaciones/baskets.gif" width="100" height="100" /></p>
</body>


</html>

gracia spor su ayuda