- Joined
- Sep 12, 2008
- Messages
- 1,204
- Reaction score
- 50
Code:
I am new to PHP, I can't figure out what is wrong. I appreciate it if you can fix the problem.
Regards,
NTV
PHP:
<?php
// 1. Create a connection
$connection = mysql_connect("localhost", "root", "");
?>
<?php require_once("includes/functions.php"); ?>
<?php include("includes/header.php"); ?>
<div id="content">
<table id="table">
<tr>
<td id="nav">
<?php
// 3. Ask database question
$result = mysql_query("SELECT * FROM information", $connection);
?>
<?php
// 4. Use Data
while ($row = mysql_fetch_array($result)){
echo $row[1]." ". $row[2]."<br />";
}
?>
</td>
</tr>
</table>
</div>
<?php
require("includes/footer.php");
?>
<?php
// 5. Close Connection
mysql_close($connection);
?>
I am new to PHP, I can't figure out what is wrong. I appreciate it if you can fix the problem.
Regards,
NTV

