ok 😮)
ive just started learning to work with mysql/php and the problem that im having is that when i try to take stuff out of the db it prints out twice
this is the code im using (from the php manual 🙂
<?php
$link = mysql_connect("mysql_host", "mysql_login", "mysql_password")
or die ("Could not connect");
print ("Connected successfully");
mysql_select_db ("my_database")
or die ("Could not select database");
$query = "SELECT * FROM my_table";
$result = mysql_query ($query)
or die ("Query failed");
// printing HTML result
print "<table>\n";
while($line = mysql_fetch_array($result)){
print "\t<tr>\n";
while(list($col_name, $col_value) = each($line)){
print "\t\t<td>$col_value</td>\n";
}
print "\t</tr>\n";
}
print "</table>\n";
mysql_close($link);
?>
any help would be appreciated