|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Classes - Connecting with mysqli
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['name']; echo "</td><td>"; echo $row['age']; echo "</td></tr>"; } echo "</table>"; //mysqli_close($mysqli); ?> [/codebox] Thank-you |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > Classes - Connecting with mysqli |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|