Академический Документы
Профессиональный Документы
Культура Документы
1) Open Notepad application then create new file and name it with extension .php. For
example try.php. Place this file in the folder located in Wnmp\html.
2) Type this code in your file.
<?php
echo("Hello World!\n");
?>
Test your code by type in your browser "localhost/try.php". Your
webpage should look like this.
FIRSTNAME
ABU
LEE
MUTHU
LASTNAME
ALI
CHONG
SAMY
TELEPHONE
013-1234567
017-1234567
012-1234567
EMAIL
ali@gmail.com
chong@gmail.com
samy@gmail.com
?>
<html>
<head>
<title> address book </title>
</head>
<body>
<h1>address book</h1>
<table border="1" cellpadding="2" cellspacing="3">
<tr>
<th>ID</th>
<th> FIRST TIME</th>
<th> LAST NAME </th>
<th> TELEPHONE </th>
<th> EMAIL </th>
</tr>
<?php
while($row = mysqli_fetch_array($result)) {
echo "<tr>";
echo "<td>" . $row['id'] . "</td>";
echo "<td>" . $row['firstname'] . "</td>";
echo "<td>" . $row['lastname'] . "</td>";
echo "<td>" . $row['telephone'] . "</td>";
echo "<td>" . $row['email'] . "</td>";
echo "<\tr>";
}
//mysql_free_result($result);
mysqli_close($con);
?>
</table>
</body>
</html>
Test your code.