Ver Mensaje Individual
  #4 (permalink)  
Antiguo 05/03/2009, 11:39
Avatar de El_Fantasma
El_Fantasma
 
Fecha de Ingreso: marzo-2005
Ubicación: Peru
Mensajes: 481
Antigüedad: 19 años, 1 mes
Puntos: 4
Respuesta: tengo un problema con una linea

Cita:
<?
// datos de configuracion
$hozt = ‘localhost’;
$usuario = ‘dalvy_dalvy’;
$password = ‘dalvycito’;
$db_name = ‘dalvy_dalvy’;
// conectamos con la db
$conn = mysql_pconnect($hozt,$usuario,$password) or die();
// seleccionamos la base de datos
$huboerror = mysql_select_db($db_name,$conn) or die();
// si se envia el formulario
if ( !empty($_POST['submit']) ) {
// esta es la linea que no la entiendo
$query = “INSERT INTO `autos` (id,foto,descripcion) values (’{$_POST['id']}’,'{$_POST['foto']}','($_POST['descripcion'])'”;

$response = mysql_query($query, $conn);
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Panel Administracion</title>
<style type="text/css">
<!--
.Estilo1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}
-->
</style>
</head>
<body>
<form action='agregar.php' method='post'>
<p class="Estilo1">Url de la Imagen
&nbsp;
&nbsp;
&nbsp;
&nbsp;
<input name='foto' type='text' id="foto">
</p>
<p class="Estilo1">Nombre del producto:
<input name='id' type='text' id="id" />
</p>
<p class="Estilo1">Caracterisitcas:

&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
<input name='descrhoztcion' type='text' id="descripcion" />
</p>
<p class="Estilo1">Link del producto:
&nbsp;
&nbsp;
&nbsp;
<input name='link' type='text' id="link" />
</p>
<p>
<span class="Estilo1">
<input type='submit' name='enviar' value='Enviar'>
</span></p>
</form>
<body>
</body>
</html>

este es e lcodigo
__________________
Vida esta LLena de Retos, pero Retos A superar http://www.ideasmkt.com