PHP trying to display data from MySQL Database -


i'm trying display records database code:

<?php   include("carconnect.php");  $sqlget ="select * cars"; $sqldata = mysqli_query($connect , $sqlget) or die ("error retrieving data!");  while ($row = mysqli_fetch_array($sqldata , mysqli_assoc)) { echo $row['car']; }  ?> 

basically i'm getting on webpage error retrieving data message..

updated: speech marks shouldnt have been there sorry.

there " in $sqldata = "mysqli_query before mysqli_query. please remove or try following code.

try

include("carconnect.php");  $sqlget ="select * cars"; $sqldata = mysqli_query($connect , $sqlget) or die ("error retrieving data!");  while ($row = mysqli_fetch_array($sqldata , mysqli_assoc)) { echo $row['car']; } 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -