code
Posté : 02 mai 2007, 17:17
quelle erreur?
page:fixer_rat.html
page:fixer_rat.html
<?
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style1 {
color: #FFFFFF;
font-family: "Comic Sans MS";
font-size: 16px;
}
.style2 {
color: #FFFFFF;
font-size: 18px;
font-family: "Comic Sans MS";
}
.style3 {
font-family: "Comic Sans MS";
color: #FFFFFF;
}
-->
</style>
</head>
<body background="images/nv_arr.jpg">
<form id="form1" name="form1" method="post" action="Envoyer_fixer.php">
<label><span class="style2">section</span>
<input type="text" name="section" />
<span class="style1"><br />
<br />
</span><span class="style2">niveau</span>
<input type="text" name="niveau" />
</label>
<p>
<label><span class="style1">num_gr</span>
<input type="text" name="num_gr" />
</label>
</p>
<p>
<label><span class="style3">nom_mat</span>
<input type="text" name="nom_mat" />
</label>
</p>
<p>
<label><span class="style1"> num_sall </span>
<input type="text" name="num_sall" />
</label>
</p>
<p>
<label><span class="style1">type</span>
<input type="text" name="type" />
</label>
</p>
<p>
<label><span class="style1"> jour
</span>
<input type="text" name="jour" />
</label>
</p>
<p>
<label><span class="style1"> date</span>
<input type="text" name="date" />
</label>
</p>
<p>
<label><span class="style3">horaire </span>
<input type="text" name="horaire" />
</label>
</p>
<p>
<center>
<label>
<input type="submit" name="Envoyer" value="Envoyer" />
</label>
</center>
</p>
</form>
</body>
</html>
page=envoyer_fixer.php
<?
session_start();
?>
<html>
<body>
<?
if(!empty($section)&& !empty($niveau)&& !empty($num_gr)&& !empty($nom_mat)&& !empty($num_sall)&& !empty($type)&& !empty($jour)&& !empty($date)&& !empty($horaire))
{
mysql_connect("localhost","root","");
mysql_select_db("intranet");
$section =$_POST['section'];
$niveau =$_POST['niveau'];
$num_gr =$_POST['num_gr'];
$nom_mat =$_POST['nom_mat'];
$query1 = "select code_mat from `matiére` where (nom_mat='$nom_mat')";
$result1 = mysql_query($query1);
$num_sall =$_POST['num_sall'];
$type =$_POST['type'];
$jour =$_POST['jour'];
$date=$_POST['date'];
$horaire=$_POST['horaire'];
$id_ens=$row[5];
$requet="INSERT INTO derouler(id_ens,code_mat,num_gr,section,niveau,num_sall,type,jour,horaire,date) VALUES ('id_ens',' $result1','num_gr','section','niveau','num_sall','type','jour','horaire','date')";
$result=mysql_query($requet);
include "affichage.php";
echo"<font color=\"white\" size=\"+2\" face=\"Monotype Corsiva\">votre rattrapage a été enrégistré $pref. $row[1].. Merci";?> <a href="debut_ens.php" target="contenu"><center><img src="images/left.gif" border="0"></center></a>
<?
mysql_close();
}
else
{
include "affichage.php";
?><font face="Monotype Corsiva"><font size="+2" color="#FFFFCC"><p align="center"><? echo"les champs sont vides $pref. $row[1] ,veuillez remplir touts les champs.. Merci";?></p></font></font>
<a href="debut_ens.php" target="contenu"><center><img src="images/left.gif" border="0"></center></a>
<?
}
?>
</body>
</html>
merci