Bonjour, j'ai une base de donnes name, et 1 table 'name' 2 champs 'name' 'mean'
pour les noms et significations,
voila le script pour lister les noms:
mon problem est comment faire un truc comme index.php?nom=jan
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 <?php // Make a MySQL Connection include('config.php'); mysql_connect($dbhost,$dbuname,$dbpass) or die(mysql_error()); mysql_select_db("name") or die(mysql_error()); // Get all the data from the "Name" table $result = mysql_query("SELECT * FROM Name") or die(mysql_error()); echo "<table border='1'>"; echo "<tr> <th>Name</th> <th>Mean</th> </tr>"; // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table echo "<tr><td>"; echo $row['name']; echo "</td><td>"; echo $row['mean']; echo "</td></tr>"; } echo "</table>"; ?>
pour avoir le nom jan et signification.
qulqu'un peu m'aider ??
Partager