A voir également:
- Multiple insersion avec un seul submit
- Ecran multiple pc - Guide
- Excel cellule choix multiple - Guide
- Copier coller multiple - Guide
- Son dans un seul écouteur avec fil ✓ - Forum Casque et écouteurs
- Paris multiple 2/6 explication - Forum Excel
2 réponses
ton code n 'est pas tres propre ...
pourquoi pas sortir deja les headers
tu auras deja qu'un seul formulaire ....
Apres il te faudra distinguer les "names" des inputs ....
pourquoi pas ajouter un indice dans les names ...
A toi de voir....
tu me diras "mais je veux deux formulaires ...
alors ...
comprends tu ?
oublies pas de modifier les indice du $_GET ...
else { while($note=mysql_fetch_array($sql2)){ ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>UPDATE-NOTE</title> </head> <body> <form method="GET" name="noteup" action="noteupdate.php"> <br /><br /><br /> <table align="center" width=500px> ...
pourquoi pas sortir deja les headers
else { echo '<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>UPDATE-NOTE</title> </head> <body> <form method="GET" name="noteup" action="noteupdate.php"> <br /><br /><br /> <table align="center" width=500px> '; while($note=mysql_fetch_array($sql2)){ ?> ....
tu auras deja qu'un seul formulaire ....
Apres il te faudra distinguer les "names" des inputs ....
pourquoi pas ajouter un indice dans les names ...
A toi de voir....
tu me diras "mais je veux deux formulaires ...
alors ...
else { echo '<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>UPDATE-NOTE</title> </head> <body>'; $i=0; while($note=mysql_fetch_array($sql2)){ $i++; echo '<form method="GET" name="noteup_'.$i.'" action="noteupdate.php"> <br /><br /><br /> <table align="center" width=500px> '; ?> ....
comprends tu ?
oublies pas de modifier les indice du $_GET ...
excuse moi pour le retard une mechante grippe me fatigue, je ne comprend pas la requete recupere les note en double dont l'une modifiable lorsque je fais les modification il me dis que les notes sont modifees alors que ce n'est pas le cas
session_start();
//-----Deconnection et securisation puisqon n peu pas tripatouller la barre d'addresse pour y acceder
if(isset($_GET['logout']))
{
unset($_SESSION['login']);
}
//-----Verification login
if(!isset($_SESSION['login']))
{
header('location:../../index.php');
}
?>
<?php
include('../includes/fonctions.inc.php');
if(isset($_GET['suppr']))
{
$requete="DELETE FROM note WHERE idelevenote='".$_GET['idelevenote']."' AND matierenote='".$_GET['matierenote']."' ";
mysql_query($requete);
}
if (!isset($_GET['up']))
{
$sql=mysql_query("SELECT * FROM note ORDER by idelevenote, matierenote");
}
else
{
$id=$_GET['id'];
$sql=mysql_query("SELECT * FROM note WHERE ideleve=".$id );
//$note=mysql_fetch_array($sql);
}
$sql2="SELECT * FROM classe";
$resultat2=mysql_query($sql2);
$sql4="SELECT * FROM matiere";
$resultat4=mysql_query($sql4);
$sql3="SELECT * FROM classe";
$resultat3=mysql_query($sql3);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>note</title>
<meta name="keywords" content="" />
<meta name="Adhesive" content="" />
<link href="../../css/admin.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="wrapper">
<?php include('../includes/menu.ini.php'); ?>
<div id="page">
<!--boutton deconnection-->
<span class="decnx"> <a href="admin.php?logout=ok">
<font color="white" >Se deconnecter</a></font></span>
<table border="0px" >
<tr>
<td align="center">
<form name="formrem" method="GET" action="noteUpdate.php" target="_blank" class="mat" >
<label><br />Entrer Matricule
<input type="text" name="id" size=5 value="<?php if(isset($_GET['id']))echo $_GET['id']; ?>" />
</label>
<label>
<input type="submit" name="up" value="valider" />
</label>
</form>
</td>
<td></td>
<td>
<form name="rechercheclasse" method="GET" action="noteclasse.php" target="_self" >
<label>Selectionner une classe:
<select name="classe" id="classe">
<?php while($listeclasse=mysql_fetch_array($resultat2)){ ?>
<option value="<?php echo $listeclasse['classe']; ?>" >
<?php echo $listeclasse['classe']; ?>
</option>
<?php } ?>
</select>
</label>
<label>
<input type="submit" name="bouton" id="bouton" value="Rechercher" />
</label>
</form>
</td>
<td>
<form name="rechmatiere" method="GET" action="noteclassematiere.php" target="_self" >
<label>Selectionner
<select name="classe2" id="classe2">
<?php while($listeclasse2=mysql_fetch_array($resultat3)){ ?>
<option value="<?php echo $listeclasse2['classe']; ?>" >
<?php echo $listeclasse2['classe']; ?>
</option>
<?php } ?>
</select>
</label>
<select name="matiere2" id="matiere2">
<?php while($listematiere=mysql_fetch_array($resultat4)){ ?>
<option value="<?php echo $listematiere['matiere']; ?>" >
<?php echo $listematiere['matiere']; ?>
</option>
<?php } ?>
</select>
<label>
<input type="submit" name="bouton2" id="bouton2" value="Acceder" />
</label>
</form>
</td>
</tr>
</table>
<table align="center" border="1px" frame="void" >
<caption>Liste des notes</caption>
<th>Mat.</th><th>Matiere</th><th>note1</th><th>note2</th><th>note3</th>
<th>compo1</th><th>trim1</th><th>note4</th><th>note5</th><th>note6</th>
<th>compo2</th><th>trim2</th>
<?php while($eleve=mysql_fetch_array($sql)) { ?>
<tr>
<td><?php echo $eleve['idelevenote']; ?></td>
<td><?php echo $eleve['matierenote']; ?></td>
<td><?php echo $eleve['note1']; ?></td>
<td><?php echo $eleve['note2']; ?></td>
<td><?php echo $eleve['note3']; ?></td>
<td><?php echo $eleve['compo1']; ?></td>
<td><?php echo $eleve['trim1']; ?></td>
<td><?php echo $eleve['note4']; ?></td>
<td><?php echo $eleve['note5']; ?></td>
<td><?php echo $eleve['note6']; ?></td>
<td><?php echo $eleve['compo2']; ?></td>
<td><?php echo $eleve['trim2']; ?></td>
<td><a href="noteupdate.php?id=<?php echo $eleve['idelevenote'];?>" ><img src="../../images/modif.png" /></a></td>
<td><a href="note.php?id=<?php echo $eleve['idelevenote']; echo $eleve['matierenote'];?> &suppr=ok"><img src="../../images/supp.png" /></a></td>
</tr><?php } ?>
</table>
</div>
<div id="footer-wrapper">
<div id="footer">
<p class="copyright">© 2013 TOUS DROIT RESERVE A <a href="#">TOPVISION</a>.</p>
</div>
</div> <!---Fin footer-wratter-->
</div><!--fin wratter-->
</body>
</html>