Programmation web en PHP
mamado
-
ReDLoG -
ReDLoG -
Bonjour,
--->salut
SVP il m'apparéttre ce message d'erreur lors de l'execution
///---Notice: Use of undefined constant exercice_dap - assumed 'exercice_dap' in C:\Program Files (x86)\EasyPHP-5.3.6.0\www\achat_TransTu\1cons.php on line 36
ERREUR MYSQL numéro: 1064
Type de cette erreur: Erreur de syntaxe pr?s de 'and exercice_dap=exercice_dap' ? la ligne 1-----///
s'il y a un(e) personne qui m'aide et merci.
<?php
include('config.php');
?>
<!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=utf-8" />
<link href="<?php echo $design; ?>/style.css" rel="stylesheet" title="Style" />
<title>Connection</title>
</head>
<body>
Recherche <br /><br />
<center>
<form action='' method='post'>
Code_dap: <input type='text' name='code_dap' /><br />
Exercice_dap: <input type='text' name='exercice_dap' /> <br />
Type : <select name='type_dap' class='Style15' style='border:1px solid #CC0000; color:#0000FF font:' comic sans ms';'>
<option value='0'>=== Choisir une type ===</option>
<option value='1'>etranger</option>
<option value='2'>locale</option>
<option value='2'>parallele</option>
</select>
<input type='submit' value='Envoyer' />
</form>
</center>
<?php
if (isset ($_POST['code_dap'],$_POST['exercice_dap'],$_POST['type_dap']))
{
$code_dap=$_POST['code_dap'];
$exercice_dap=$_POST['exercice_dap'];
$type_dap=$_POST['type_dap'];
$req = mysql_query("SELECT * FROM dap_e where code_dap=".$code_dap."and exercice_dap=".exercice_dap)
or die( "ERREUR MYSQL numéro: ".mysql_errno()."<br>Type de cette erreur: ".mysql_error()."<br>\n" );
$num = mysql_num_rows($req);
echo $num;
echo "<br>";
echo( "<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" align=\"center\">\n" );
echo( "<tr>
<td><div align=\"center\">code_dap</div></td>
<td><div align=\"center\">exercice_dap</div></td>
<td><div align=\"center\">type_dap</div></td>
<td><div align=\"center\">date de creation</div></td>
<td><div align=\"center\">Nature</div></td>
<td><div align=\"center\"></div></td>
</tr>" );
while( $result = mysql_fetch_array( $req ) )
{
echo( "<tr>\n" );
echo( "<td><div align=\"center\">".$result["code_dap"]."</div></td>\n" );
echo( "<td><div align=\"center\">".$result["exercice_dap"]."</div></td>\n" );
echo( "<td><div align=\"center\">".$result["type_dap"]."</div></td>\n" );
?>
<td><div align=\"center\"><input type="text" name="n1" value="<?PHP echo $result["date_cre_dap"] ;?>." /></div></td>
<?PHP
echo( "<td><div align=\"center\">".$result["nature_dap"]."</div></td>\n" );
echo( "<td><div align=\"center\"><a href='cons_dap.php'>Detail</a></div></td>\n" );
echo( "</tr>\n" );
}
}
echo( "</table><br>\n" );
?>
</body>
</html>
--->salut
SVP il m'apparéttre ce message d'erreur lors de l'execution
///---Notice: Use of undefined constant exercice_dap - assumed 'exercice_dap' in C:\Program Files (x86)\EasyPHP-5.3.6.0\www\achat_TransTu\1cons.php on line 36
ERREUR MYSQL numéro: 1064
Type de cette erreur: Erreur de syntaxe pr?s de 'and exercice_dap=exercice_dap' ? la ligne 1-----///
s'il y a un(e) personne qui m'aide et merci.
<?php
include('config.php');
?>
<!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=utf-8" />
<link href="<?php echo $design; ?>/style.css" rel="stylesheet" title="Style" />
<title>Connection</title>
</head>
<body>
Recherche <br /><br />
<center>
<form action='' method='post'>
Code_dap: <input type='text' name='code_dap' /><br />
Exercice_dap: <input type='text' name='exercice_dap' /> <br />
Type : <select name='type_dap' class='Style15' style='border:1px solid #CC0000; color:#0000FF font:' comic sans ms';'>
<option value='0'>=== Choisir une type ===</option>
<option value='1'>etranger</option>
<option value='2'>locale</option>
<option value='2'>parallele</option>
</select>
<input type='submit' value='Envoyer' />
</form>
</center>
<?php
if (isset ($_POST['code_dap'],$_POST['exercice_dap'],$_POST['type_dap']))
{
$code_dap=$_POST['code_dap'];
$exercice_dap=$_POST['exercice_dap'];
$type_dap=$_POST['type_dap'];
$req = mysql_query("SELECT * FROM dap_e where code_dap=".$code_dap."and exercice_dap=".exercice_dap)
or die( "ERREUR MYSQL numéro: ".mysql_errno()."<br>Type de cette erreur: ".mysql_error()."<br>\n" );
$num = mysql_num_rows($req);
echo $num;
echo "<br>";
echo( "<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\" align=\"center\">\n" );
echo( "<tr>
<td><div align=\"center\">code_dap</div></td>
<td><div align=\"center\">exercice_dap</div></td>
<td><div align=\"center\">type_dap</div></td>
<td><div align=\"center\">date de creation</div></td>
<td><div align=\"center\">Nature</div></td>
<td><div align=\"center\"></div></td>
</tr>" );
while( $result = mysql_fetch_array( $req ) )
{
echo( "<tr>\n" );
echo( "<td><div align=\"center\">".$result["code_dap"]."</div></td>\n" );
echo( "<td><div align=\"center\">".$result["exercice_dap"]."</div></td>\n" );
echo( "<td><div align=\"center\">".$result["type_dap"]."</div></td>\n" );
?>
<td><div align=\"center\"><input type="text" name="n1" value="<?PHP echo $result["date_cre_dap"] ;?>." /></div></td>
<?PHP
echo( "<td><div align=\"center\">".$result["nature_dap"]."</div></td>\n" );
echo( "<td><div align=\"center\"><a href='cons_dap.php'>Detail</a></div></td>\n" );
echo( "</tr>\n" );
}
}
echo( "</table><br>\n" );
?>
</body>
</html>
A voir également:
- Programmation web en PHP
- Web office - Guide
- Navigateur web - Guide
- Création site web - Guide
- Application de programmation - Guide
- K9 web protection - Télécharger - Contrôle parental
et si j'ai cette formule comme la mettre en php?
<form action='' method='post'>
<TABLE BORDER=0>
<TR>
<TD>Nom</TD>
<TD>
<INPUT type=text name="nom">
</TD>
</TR>
<TR>
<TD>Nom</TD>
<TD>
<INPUT type=text name="prenom">
</TD>
</TR>
<TR>
<TD>Prénom</TD>
<TD>
<INPUT type=text name="Mail">
</TD>
</TR>
<TR>
<TD>Sexe</TD>
<TD>
Homme : <INPUT type=radio name="sexe" value="M">
<br>Femme : <INPUT type=radio name="sexe" value="F">
</TD>
</TR>
<TR>
<TD>Fonction</TD>
<TD>
<SELECT name="fonction">
<OPTION VALUE="Portes automatiques">Enseignant</OPTION>
<OPTION VALUE="Contrôle d'accès">Etudiant</OPTION>
<OPTION VALUE="Ascenseur">Ingénieur</OPTION>
<OPTION VALUE="autre">Autre</OPTION>
</SELECT>
</TD>
</TR>
<TR>
<TD>Commentaires</TD>
<TD>
<TEXTAREA rows="3" name="commentaires">
Tapez ici vos commentaires</TEXTAREA>
</TD>
</TR>
<td><input size="24" type="file" id="cv" name="cv"></td>
<TR>
<TD COLSPAN=2>
<INPUT type="submit" value="Envoyer">
</TD>
</TR>
</TABLE>
</FORM>