1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
<html>
<head>
</head>
<body>
<form method="get" action="indexo.php" name="désignation">
<table>
<tr>
<td width="40">Liste des themes</td>
<td width="144"><?php
@ $db = new mysqli('localhost','root','','conférence1');
mysqli_select_db($db,'conférence1');
$query = " SELECT désignation FROM théme order by désignation";
$result = $db->query($query);
if($result)
{
echo ' <select name="désignation" id="désignation" >';
while($e=mysqli_fetch_object($result))
{
echo "<option>
$e->désignation
</option>";
}
}
?>
</td>
</tr>
<tr>
<td>
<span style='margin-left:400px;'>
<input type="submit" value ="RECHERCHE">
</span>
</td>
</tr>
</table>
</form>
<p align="center">
<?php
if(isset($_GET['désignation']))
{
$dbprotect = mysql_pconnect("localhost","root", "") or trigger_error(mysql_error(),E_USER_ERROR);
mysql_select_db('conférence1', $dbprotect);
$query_users = "SELECT * FROM papier where theme=".$_GET['désignation'] ;
$users = mysql_query($query_users,$dbprotect) or die(mysql_error());
$row_users = mysql_fetch_assoc($users);
?>
<select name="désignation" size="8" id="select">';
<?php
do {
?>
<option value="<?php echo $row_users['id']?>">
<?php echo $row_users['titre'] ; ?>
</option>
<?php
}while($row_users = mysql_fetch_assoc($users));
$rows = mysql_num_rows($users);
if($rows > 0) {
mysql_data_seek($users, 0);
$row_users = mysql_fetch_assoc($users);
}
}
?>
</p>
</body>
</html> |