hey i am stuck i want some help in my script ,in the first time i was using this line of code:
[php]echo "
[/php]
and when i click on insert they lead me to this page (line of code):
[code]<?php
include_once(‘base.php’);
echo mysql_error();
if(isset($_GET[‘insert’])){
$Matricule = $_GET[‘insert’];
$Id_Matiere = $_GET[‘number’];
$res = mysql_query(“select * from evaluation WHERE Matricule = ‘$Matricule’”);
$rows = mysql_fetch_array($res);
}
echo mysql_error();
if(isset($_POST[‘Td’])){
$Matricule = $_POST[‘Matricule’];
$Id_Matiere = $_GET[‘number’];
$Td = mysql_real_escape_string($_POST[‘Td’]);
$sql = “UPDATE evaluation SET Td = ‘$Td’ WHERE Matricule = ‘$Matricule’”;
//$sql = “UPDATE evaluation
SET Td=15 WHERE
Matricule`=1”;
$res = mysql_query($sql) or die("Could not update ".mysql_error());
echo "<meta http-equiv='refresh' content='0;url=edittd.php'>";
echo "You/'ve Successfully insert the Td Note Thanks.";
//INSERT INTO `b_database`.`evaluation` (`Matricule`, `Id_Matiere`, `Td`, `Tp`, `Exam`, `Ratrapage`) VALUES ('13458', '14', '3.25', '0', '0', '0')
}
?>
TD:[/code]
so i will be able to update mu values into my database, but it’s too slow for any user to insert data if i have a lot of values in my array do the user have to click on every insert button to lead him to another page and update the value so , i was thinking to change my code of line to this :
echo "<td><input type='text'> </td>";
so they can insert a lot of values in one line and click on one submit button and all the values get stored into my database ,so please how can i include the 1st line of code echo "<td>{$rows['tp']}<a href='edittd.php?edit={$rows['Nom_Matiere']}&number={$rows['Numero']}'> insirer <a></td>";
to this input type
[php]echo "
and the textbox recognize every row like he did on insirer :
[php]{$rows[‘Nom_Matiere’]}&number={$rows[‘Numero’]}[/php]
thanks in advance !