php - Outputting contents of database mysqli -
hi know little general cant seem work out reading online.
im trying connnect database using php / mysqli using wamp server , database local host on php admin.
no matter try keep getting error warning: mysqli_fetch_array()
expects parameter 1 mysqli_result
, boolean given when try output contents of database.
the code im using is:
if (isset($_post["submit"])) { $con = mysqli_connect("localhost"); if ($con == true) { echo "database connection established"; } else { die("unable connect database"); } $result = mysqli_query($con,"select *"); while($row = mysqli_fetch_array($result)) { echo $row['login']; } }
the best way go , check these links out. http://php.net/manual/en/index.php
Comments
Post a Comment