Jump to content

SIMPLE TABLE PROBLEM


pablo1988

Recommended Posts

Can anybody see how to fix the table below. My results are being stacked horizontally rather than vertically. I have attached a picture for you to see what I mean.

 

Thanks

 

 

//SKILL - query  the database table

$sql="SELECT Skill_Name, Rating FROM resource_skill ln

inner join skill n on ln.Skill_ID = n.Skill_ID

WHERE ln.Resource_ID=" . $contactid;

 

//SKILL - run  the query against the mysql query function

$result=mysql_query($sql) or die(mysql_error() . '<br />' . $sql);

echo "<table id=skill>";

echo "<tr>";

echo "<th>Skill</th>";

echo "<th>Rating</th>";

echo "</tr>";

 

//create  while loop and loop through result set

while($row=mysql_fetch_array($result)){

$Skill_Name=$row['Skill_Name'];

$Rating=$row['Rating'];

 

   

//display the result of the array

echo  "<ul>\n";

echo "<td>" . ""  .$Skill_Name . " <td>" . $Rating .  "</td></td>\n";

echo "</ul>";

 

}

 

}

 

echo "</tr>";

echo "</table>";

 

 

 

 

 

 

 

?>

post-133092-13482403402938_thumb.png

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.