Ver Mensaje Individual
  #3 (permalink)  
Antiguo 31/07/2006, 11:20
AME
 
Fecha de Ingreso: julio-2006
Mensajes: 71
Antigüedad: 17 años, 9 meses
Puntos: 0
HOLA

esta es una parte de mi codigo al insertar en la base de datos:

$editFormAction = $HTTP_SERVER_VARS['PHP_SELF'];
if (isset($HTTP_SESSION_VARS['QUERY_STRING']))
{
$editFormAction.="?".$HTTP_SERVER_VARS['QUERY_STRING'];
}
if ((isset($HTTP_POST_VARS["MM_insert"])) && ($HTTP_POST_VARS["MM_insert"] == "form1"))
{
$insertSQL = sprintf("INSERT INTO almacenaccesorios (FOLIO, IDHARDWARE, IdMarca, MODELO, DESCRIPCION, STATUS) VALUES (%s,%s,%s,%s,s%,%s)",
GetSQLValueString($HTTP_POST_VARS[FOLIO], "text"),
GetSQLValueString($HTTP_POST_VARS[Idhardware], "int"),
GetSQLValueString($HTTP_POST_VARS[IdMarca], "int"),
GetSQLValueString($HTTP_POST_VARS[MODELO], "text"),
GetSQLValueString($HTTP_POST_VARS[DESCRIPCION], "text"),
GetSQLValueString($HTTP_POST_VARS[STATUS], "text"));

mysql_select_db($database_conexion,$conexion);
$Result = mysql_query($insertSQL,$conexion) or die(mysql_error());

$insertGoTo = "almacen.php";
if (isset($HTTP_SERVER_VARS['QUERY_STRING']))
{
$insertGoTo .=(strpos($insertGoTo,'?')) ? "&" : "?";
$insertGoTo .=$HTTP_SERVER_VARS['QUERY_STRING'];
}
header(sprintf("Location:%s", $insertGoTo));
}
?>


esta es la parte donde introduzco el regsitro y no me la acepta:
<form method="post" name="form1" action="<?php echo $editFormAction; ?>">
<table width="73%" border="1" cellspacing="1" cellpadding="2" align="center">
<tr>
<td width="38%" rowspan="2">&nbsp;</td>
<td width="39%">FOLIO&nbsp;</td>
<td width="23%"><input name="FOLIO" type="text" size="5" maxlength="5" />
&nbsp;</td>
</tr>.

espero darme a entender y gracias por su ayuda.