Ver Mensaje Individual
  #2 (permalink)  
Antiguo 05/07/2005, 16:38
wjlopez
 
Fecha de Ingreso: marzo-2004
Mensajes: 109
Antigüedad: 20 años
Puntos: 0
lo probe asi tambien

<?php require_once('../Connections/Base_ser.php'); ?>
<?php
$hostname_conn = "localhost";
$database_conn = "ser";
$username_conn = "mn";
$password_conn = "900";
$conn = mysql_connect($hostname_conn, $username_conn, $password_conn) or trigger_error(mysql_error(),E_USER_ERROR);
//

mysql_select_db($database_Base_ser, $Base_ser);
$query_manto_val_sup = "SELECT * FROM sol_val_sup WHERE ESTADO = 'INGRESADA'";
$manto_val_sup = mysql_query($query_manto_val_sup, $Base_ser) or die(mysql_error());
$row_manto_val_sup = mysql_fetch_assoc($manto_val_sup);
$totalRows_manto_val_sup = mysql_num_rows($manto_val_sup);

if(isset($_POST['doIt'])){
mysql_select_db($database_conn, $conn);
for($i=0; $i<sizeof($_POST['item']); $i++){
$insertSQL = "UPDATE sol_val_sup SET ESTADO = '".$_POST['status']."' WHERE id_trans = ".$_POST['item'][$i];
mysql_query($insertSQL, $conn);
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Actualizacion</title>
<style type="text/css">
<!--
body {
background-color: #0082be;
}
-->
</style></head>

<body>
<form name="form1" method="post" action="">
<table width="90%" border="1" align="center" cellpadding="2" cellspacing="3">
<?php $i = 1;?>
<?php do{ ?>
<tr>
<td width="5%"><strong><?php echo $row_manto_val_sup['carnet']; ?></strong></td>
<td><strong><?php echo $row_manto_val_sup['cantidad']; ?></strong></td>
<td width="18%"><strong><?php echo $row_manto_val_sup['present_a']; ?></strong></td>
<td width="25%"><strong><?php echo $row_manto_val_sup['lugar_entrega']; ?></strong></td>
<td width="20%"><strong><?php echo $row_manto_val_sup['fcha_ingreso']; ?></strong></td>
<td width="15%"><strong><?php echo $row_manto_val_sup['ESTADO']; ?></strong></td>
<td width="5%"><strong>
<input name="item[]" type="checkbox" id="item[]" value="<?php echo $row_rs['id_trans'] ?>">
</strong></td>
<td width="7%"><strong> vale <?php echo $i ?></strong></td>
</tr>
<?php }while($row_manto_val_sup = mysql_fetch_assoc($manto_val_sup)); ?>
</table>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><p>&nbsp;
</p>
<p>
<select name="status" id="status">
<option value="INGRESADA">INGRESADA</option>
<option value="PROCESADO">PROCESADO</option>
</select>
</p>
<p>
<input type="submit" name="Submit" value="Procesar">
<input name="doIt" type="hidden" value="1">
</p></td>
</tr>
</table>
</form>
</body>
</html>
<?php
mysql_free_result($manto_val_sup);
?>

Por favor ayudaaaaaaaaaaaaaaa