Hello all!
I am kind of a newbie in PHP issues, but I try to work with structural programming.
I have a form, where I print some database information:
try it here:
http://190.78.37.17/k/index.php
username: asuarez
password: 123
So, the user logs in, goes to PREINSCRIPCIONES, and then you click on CONTINUAR (select either value in combo box, it doesn’t matter)
[b]What I need, is the user to select All the subjects he/she wants to submit, and with one click, update them all.
So far, with the code I am sending, I can update One of them, always the last one I select…
I believe I need some kind of loop and array, but Can’t seem to find where.[/b]
Please, if anybody has an Idea, please please let me know
<?php error_reporting(0); require_once('config.php'); if(!isset($_SESSION['usuario'])) $_SESSION['usuario'] = ''; if(!isset($_SESSION['enlinea'])) $_SESSION['enlinea'] = 'No'; $status=''; if(!isset($_GET['insertar'])) $_GET['insertar'] = ''; switch($_GET['insertar']) { case 'pre': error_reporting(0); { $querySQL= "UPDATE Notas set Preinscrita='".htmlentities($_POST['pi'])."' WHERE notas.usuario_n = '".$_SESSION['IDusuario']."' AND Notas.Materia_n = '".htmlentities($_POST['ID'])."'"; $resultado = mysql_query($querySQL); if(mysql_num_rows($resultado) == 1) { $status='OK'; } else { $status='Datos Incorrectos'; } }//la del case }//la del switch if (($_SESSION['enlinea'] != 'Si')) { echo ''; } else { echo