Ver Mensaje Individual
  #6 (permalink)  
Antiguo 22/01/2013, 14:55
Avatar de Nico0601
Nico0601
 
Fecha de Ingreso: diciembre-2012
Ubicación: Buenos Aires, Zona Sur
Mensajes: 134
Antigüedad: 11 años, 5 meses
Puntos: 0
Respuesta: Cambiar valor de la tabla mysql con javascript

Hola, la verdad que con AJAX no le encuentro la vuelta. Intente hacerlo con PHP y tengo algo asi a ver si me ayudas porque tampoco me funciona.....:(

Código PHP:
<?php
            
while($row=mysql_fetch_array($resultado))
            {
            
?>
                <tr>
                        <td><input type="checkbox" name="aporta" id="aporta" value="0" onclick="location.href='update.php?id=<?php echo $id;?>&valor=1'" /></td>
                        <td align='right'><?php echo($row['apellido']);?></td>
                        <td><?php echo($row['nombre']);?></td>
                        <td><?php echo($row['cuil']);?></td>
                        <td id="basico"><?php echo("$ ".$row['sueldo_basico']);?></td>
                        <td id="bruto"><?php echo("$ ".$row['sueldo_bruto']);?></td>
update.php tengo esto
Código PHP:
include("validar.php");
include(
"conexion.php");

$cuit=$_SESSION["nombre"];

$aporta $_POST['aporta'];
$sql "UPDATE aporta SET aporta=1 WHERE aporta = $aporta";
$rs mysql_query($sql); 
__________________
Nico...