Alguien me puede ayudar.
Es cuando ejecuto este codigo me genera un error de sql
alguien me dice por que
GRacias
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>Untitled Document</title>
<link href="stilos/estilos.css" rel="stylesheet" type="text/css" />
<script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<script src="../SpryAssets/SpryValidationSelect.js" type="text/javascript"></script>
<link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<link href="../SpryAssets/SpryValidationSelect.css" rel="stylesheet" type="text/css" />
</head>
<body style="background:#FFFFFF;">
<div id="conte_sitio">
<div id="ppal">
<div id="cabezote">
</div>
<div id="cuerpo">
<div id="contenedor_menu_iz">
<img src="images/menu_articulos_modulo.png" width="250" height="447" border="0" usemap="#Map" />
<map name="Map" id="Map">
<area shape="rect" coords="50,14,154,108" href="index.php" target="_self" />
<area shape="rect" coords="46,108,169,211" href="ingreso_articulo.php" target="_top" />
<area shape="rect" coords="47,213,168,330" href="consultar_articulo.php" target="_self" />
</map>
</div>
<div id="contenedor_ppal">
<div id="titulo">Gestión de Gatantías de Artículos</div><br />
<?php
$conexion=mysql_connect("localhost","root","") or
die("Problemas en la conexion");
mysql_select_db("c_i",$conexion) or
die("Problemas en la selección de la base de datos");
$registros=mysql_query("select _id_eq, _nom_eq, _cant_eq, _lot_eq, _id_ven_ext, _dat_comp
from _ingresos where _id_eq='$_REQUEST[_id_eq]'",$conexion) or
die("Problemas en el select:".mysql_error());
if ($reg=mysql_fetch_array($registros))
{
?>
<form method="post" name="registra" action="ingresoarticulo2">
<table width="659" border="0">
<tr>
<td width="153">Id del equipo:</td>
<td width="175"><input type="text" name="input" /></td>
<td width="167">Fecha de Salida:</td>
<td width="146"><input type="text" name="input7" value="<?php $fecha= date ( "20y/m/d"); echo $fecha; ?>" /></td>
</tr>
<tr>
<td>Nombre del equipo:</td>
<td><input type="text" name="input2" value="<?php echo $reg['_nom_eq'] ?>" /></td>
<td>Vencimiento Garantia:</td>
<td><span id="sprytextfield1">
<label>
<input type="text" name="_date_vgr_" id="_date_vgr_" />
</label>
<span class="textfieldRequiredMsg">Se necesita un valor.</span><span class="textfieldInvalidFormatMsg">Formato no válido.</span></span></td>
</tr>
<tr>
<td>Cantidad de equipos disponibles:</td>
<td><input type="text" name="input3" value="<?php echo $reg['_cant_eq'] ?>"/></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Lote del equipo:</td>
<td><input type="text" name="input4" value="<?php echo $reg['_lot_eq'] ?>"/></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Id del Proveedor:</td>
<td><input type="text" name="input5" value="<?php echo $reg['_id_ven_ext'] ?>"/></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Fecha de compra al proveedor:</td>
<td><input type="text" name="input6" value="<?php echo $reg['_dat_comp'] ?>"/></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Id Cliente:</td>
<td><span id="spryselect1">
<label>
<select name="_id_cliente" id="_id_cliente">
<?php
$conexion=mysql_connect("localhost","root","")
or die("Problemas en la conexion");
mysql_select_db("c_i",$conexion)
or die("Problemas en la selección de la base de datos");
$resultados=mysql_query("select _id_cliente, _nombre_cliente, _tel_cliente, _dir_cliente
from _clientes",$conexion) or
die("Problemas en el select:".mysql_error());
while ($reg=mysql_fetch_array($resultados))
{
echo "Codigo:"
?>
<option><?php echo $reg['_id_cliente'] ?></option>
<?php "<br>";
}
mysql_close($conexion);
?>
</select>
</label>
<span class="selectRequiredMsg">Seleccione un elemento.</span></span></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Id Vendedor:</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> <input value="Generar Garantia" type="submit" />
<?php
}
else
{
echo "<img src=\"images/error.png\" />";
echo "<br><br><br>";
echo "<a href=\"add_articulo.php\"><img src=\"images/add_articulo.png\" border=\"0\"/></a>";
echo "<a href=\"gestion_articulo.php\"><img src=\"images/consultagarantiaarticulo.png\" border=\"0\"/><br></a>";
}
mysql_close($conexion);
?>
</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
</tr>
</table>
</form>
</div>
</div>
</div>
</div>
<script type="text/javascript">
<!--
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "date", {format:"yyyy-mm-dd", hint:"aaaa-mm-dd"});
var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1");
//-->
</script>
</body>
</html>