Mercurial > hg > extraction-interface
comparison _xampp/contrib/mysql.php @ 0:b12c99b7c3f0
commit for previous development
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Mon, 19 Jan 2015 17:13:49 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:b12c99b7c3f0 |
---|---|
1 <html> | |
2 <head> | |
3 <title>PHP und MySQL</title> | |
4 </head> | |
5 <body> | |
6 <h1>PHP und MySQL</h1> | |
7 <table border="1"> | |
8 <tr> | |
9 <th>Vorname</th> | |
10 <th>Nachname</th> | |
11 <th>Telefonnummer</th> | |
12 </tr> | |
13 <?php | |
14 mysql_connect("localhost", "oswald", "geheim"); | |
15 mysql_select_db("phonebook"); | |
16 | |
17 $query = "SELECT * FROM users"; | |
18 $result = mysql_query($query); | |
19 while ($row = mysql_fetch_array ($result)) | |
20 { | |
21 echo "<tr>"; | |
22 echo "<td>".$row['firstname']."</td>"; | |
23 echo "<td>".$row['lastname']."</td>"; | |
24 echo "<td>".$row['phone']."</td>"; | |
25 echo "</tr>"; | |
26 } | |
27 | |
28 ?> | |
29 </table> | |
30 </body> | |
31 </html> |