954,580 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Display Name and Score

Hey guys,
I have a question that I need an answer to: How do you display a person's name and score?
Say, for example, a user takes a quiz and gets 80% on it. I want this information to be displayed on the side of the screen for everyone to see, so whenever a person goes to the website he can see all the scores. This way I can compare the scores between people and see who got the most correct.
Please help,
Thank you

terexberd
Newbie Poster
14 posts since Feb 2011
Reputation Points: 11
Solved Threads: 2
 

You should post the code that you currently have.

<?php //db connection
//sql query
$sql="SELECT NAME,SCORE FROM TABLE";
$result = mysql_query($sql);
while($data=mysql_fetch_assoc($result))
{
echo "<tr><td>Name:'".$data['name']."'</td>";
echo "<td>score:'".$data['score']."'</td></tr>";
}
mathieu89
Light Poster
29 posts since Nov 2010
Reputation Points: 24
Solved Threads: 3
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: