This script works with require_once and produces warnings for line 6 when I try to use $mysqli = new... (which I've commented out). Please help me with this script:
[codebox]<?php
require_once "connect_to_mysql.php";
//$mysqli = new mysqli("localhost","user","pw","db");
$result = mysql_query("SELECT * FROM example")
or die(mysql_error());
echo "<table border='1'>";
echo "<tr> <th>Name</th> <th>Age</th> </tr>";
while($row = mysql_fetch_array( $result )) {
echo "<tr><td>";
echo $row;
echo "</td><td>";
echo $row;
echo "</td></tr>";
}
echo "</table>";
//mysqli_close($mysqli);
?> [/codebox]
Thank-you