here you will get a detailed information about the fields
$result = mysql_db_query($your_database,"SHOW FIELDS FROM " . $your_table);
then fetch array the result
$row = mysql_fetch_array($result);
echo $row["Field"];
echo $row["Type"];
echo $row["Default"];
echo $row["Null"];
echo $row["Extra"];
echo $row["Attributes"];