note 108088 deleted from faq by danbrown
| From: | danbrown@php.net | Date: | Tue, 27 Mar 2012 22:32:54 +0000 |
| Subject: | note 108088 deleted from faq by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-186879@lists.php.net to get a copy of this message | ||
Note Submitter: benammarbenammar at gmail dot com
----
--->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>