lostinspacex Posted December 3, 2010 Report Share Posted December 3, 2010 holas es tarde y este script de la shit no me funca acepto sugerencias gracias =) <?php $NOMBRE= $_GET['NOMBRE']; $PRECIO= $_GET['PRECIO']; $DESCRIPCION= $_GET['DESCRIPCION']; $PROVEEDOR= $_GET['PROVEEDOR']; $ID_CATALOGO=$_GET['ID_CATALOGO']; $ID_PRODUCTO=$_GET['ID_PRODUCTO']; include("conec.php"); /*Guardamos en una variable el valor retornado de la funcion de conexion*/ $con=Conectarse(); /*Guardamos en una variable la sentencia SQL, en este caso del tipo SELECT*/ //$sql_select_1 = "select title, fname, lname from customer where fname ='$usuario' and lname='$pass'"; $sql_select_1 = " INSERT INTO `pacus_6506129_PROYECTO`.`PRODUCTOS` (`NOMBRE_PRODUCTO`, `PRECIO_PRODUCTO`, `DESCRIPCION_PRODUCTO_ `, `EMPRESA_PROVEEDOR`, `ID_PRODUCTO`, `ID_CATALOGO`) VALUES ('$NOMBRE','$PRECIO','$DESCRIPCION','$PROVEEDOR','$ID_PRODUCTO','$ID_CATALOGO');"; mysql_query($sql_select_1,$con); echo "PRODUCTO Agregado<br>\n"; echo "<a href=\"REGISTRO_PRODUCTOS.html\"> regresar </a>"; ?> Link to comment Share on other sites More sharing options...
caullito Posted March 1, 2012 Report Share Posted March 1, 2012 Socio aqui veo el problemas... //$sql_select_1 = "select title, fname, lname from customer where fname ='$usuario' and lname='$pass'"; debe ser asi: //$sql_select_1 = "select title, fname, lname from customer where fname ='".$usuario."' and lname='".$pass."'"; recuerda que debes concatenar lo que esta entre comillas, pones un punto y la variable, luego pones otro punto y abres comilla nuevamente.. espero te funcione.. Saludos. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now