Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta charset=utf-8" />
- <title>Be an artist</title>
- </head>
- <body>
- <?php
- $maRequete1 = "SELECT * FROM Dessin;";
- $maRequete2 = "SELECT * FROM Evaluateurs;";
- $connexion = mysql_connect("localhost",'gpi2','network');
- ?>
- <form method="post" action="retourAjoutNote.php">
- <?php
- if(! $connexion){
- printf("Problème de connexion");
- }
- else {
- $selectedDataBase = mysql_select_db("projet",$connexion);
- if(! $selectedDataBase){
- printf("Problème d'accès à la base");
- }
- else{
- mysql_query("SET NAMES UTF8");
- $resultat = mysql_query($maRequete1);
- $tableau = mysql_fetch_array($resultat);
- do{
- ?>
- <input type="radio" name="dessin" value="<?php echo $tableau['numero'] ?>"/>
- <?php
- } while($tableau = mysql_fetch_array($resultat));
- ?>
- <label for = 'note1'> Première note : </label>
- <input type="number" name="note" /><br/>
- <label for = 'date'>Date de l'évaluation </label>
- <input type="date" name="date" /><br/>
- $resultat2 = mysql_query($maRequete2);
- $tableau2 = mysql_fetch_array($resultat2);
- do{
- ?>
- <input type="radio" name="evaluateur" value="<?php echo $tableau2['numero'] ?>">
- <?php
- } while($tableau = mysql_fetch_array($resultat2));
- ?>
- <label for = 'commentaire1'>Commentaire : </label>
- <input type="text" name="commentaier1" /><br/>
- <label for = 'note2'> deuixème note : </label>
- <input type="number" name="note2" /><br/>
- <label for = 'date2'>Date de l'évaluation </label>
- <input type="date" name="date2" /><br/>
- <?php
- $tableau2 = mysql_fetch_array($resultat2);
- do{
- ?>
- <input type="radio" name="evaluateur" value="<?php echo $tableau2['numero'] ?>">
- <?php
- } while($tableau = mysql_fetch_array($resultat2));
- mysql_close($connexion);
- }
- ?>
- <input type="submit" value="Valider" />
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement