get information from database, and display them in a table using php
<p>I am new to database. I want to get the info from db, and display them in a table.
but it shows that there is syntax error. i cant figure out the problem. can anyone help? thanks!</p>

<pre><code>$connect = mysql_connect("127.0.0.1","root","") or die("not connecting");
mysql_select_db("fooddeliveryshop") or die("no db :'(")

$query = mysql_query("SELECT membermail, name, month,phone, add-rm, add-fli, add-blk,add-buildin, add-est, add-st, add-dis, add-reg FROM member");
$result = mysql_query($query) or die(mysql_error()); 



print " 
&lt;table&gt;&lt;tr&gt; 
&lt;td&gt;Email address:&lt;/td&gt; 
&lt;td&gt;Name:&lt;/td&gt; 
&lt;td&gt;Month of birth:&lt;/td&gt; 
&lt;td&gt;Contact telephone:&lt;/td&gt; 
&lt;td&gt;Map:&lt;/td&gt; 
&lt;td&gt;Contact address:&lt;/td&gt; 
&lt;/tr&gt;"; 

while($row = mysql_fetch_array($result, MYSQL_ASSOC)) 
{ 
print "&lt;tr&gt;"; 
print "&lt;td&gt;" . $row['memberemail'] . "&lt;/td&gt;"; 
print "&lt;td&gt;" . $row['name'] . "&lt;/td&gt;"; 
print "&lt;td&gt;" . $row['month'] . "&lt;/td&gt;"; 
print "&lt;td&gt;" . $row['phone'] . "&lt;/td&gt;";
print "&lt;td&gt;" . $row['add-rm','add-fli','add-blk','add-buildin','add-est','add-st','add-dis','add-reg'] . "&lt;/td&gt;";
print "&lt;/tr&gt;"; 
} 
print "&lt;/table&gt;";
</code></pre>
