Hi All I am a newbie and would appreciate any help you can give me.
I am using XAMPP on my mac to develop my 1st php/mysql site.
I have a db called localshops2u, and a table within that called users_shops, within that I have a column called SHOP_ID (There is more but for the purposes of getting this working I just want to output this - to prove I can get it working)
With this code I get no output at all:
<?php $host = "localhost"; $user = "root"; $password = ""; $database ="localshops2u"; $connection = mysql_connect($host,$user,$password) or die ("Server connection not made"); $db = mysql_select_db($database,$connection) or die ("db connection not made"); $query = "SELECT * FROM USERS_SHOPS"; $result = mysql_query($query,$connection) or die ("cannot query USERS_SHOPS table"); while ($row = mysql_fetch_array($result)) { echo $row['SHOP_ID'] } ?>any advice (novice error?)