view _xampp/contrib/mysql.php @ 16:fb948097de39

fix bug: Edittaglist is working on Firefox. fix bug: name of regex used to show with strange <span id="transmark"></span> showing only on FF but not Saf. Change it to use "document.getElementById(id).textContent to get the pure text string.
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Fri, 20 Feb 2015 16:39:08 +0100
parents b12c99b7c3f0
children
line wrap: on
line source

<html>
<head>
<title>PHP und MySQL</title>
</head>
<body>
<h1>PHP und MySQL</h1>
<table border="1">
<tr>
    <th>Vorname</th>
    <th>Nachname</th>
    <th>Telefonnummer</th>
</tr>
<?php
    mysql_connect("localhost", "oswald", "geheim");
    mysql_select_db("phonebook");

    $query = "SELECT * FROM users";
    $result = mysql_query($query);
    while ($row = mysql_fetch_array  ($result))
    {
        echo "<tr>";
        echo "<td>".$row['firstname']."</td>";
        echo "<td>".$row['lastname']."</td>";
        echo "<td>".$row['phone']."</td>";
        echo "</tr>";
    }

?>
</table>
</body>
</html>