jrobert755
New Member
- Messages
- 15
- Reaction score
- 0
- Points
- 0
this is not working. it should get a list of values from a table, but it never does, and just stops running, displaying whats before it, and thats all (its in an include command on another page) could someone try to fix it?
PHP:
mysql_connect("localhost", "jrobert7", "password");
mysql_select_db("jrobert7_testing");
$result= mysql_query("SELECT * FROM articles");
while($results = mysql_fetch_array($result))
{
echo "<div class=\"summary\">
<div class=\"body\">
<h2><u><a href=\"".$results['link']. "\">".$results['name']. "</a></u></h2>
<p style=\"margin-top:-2px;\">
<em>
".$results['link']. "<small>(2 hits)</small>
</em>
"$results['description'] "<a class=\"more\" href=\"".$results['link']. "\" style=\"color:#105CB6;\">More...</a>
</p>
<div class=\"options\">
<a class=\"space compick\" href=\"".$results['link']. "\">0 comments</a>
<a class=\"space share\" href=\"".$results['link']. "\">Share</a>
<a class=\"space views\" href=\"".$results['link']. "\">".$results['views']. "\"views</a>
</div>
</div>
<ul class=\"fav\">
<li class=\"favcount\">
<a class=\"favcount\" href=\"".$results['link']. "\"><strong>".$results['fav']. "</strong><br />
<span>favs</span></a>
</li>
<li class=\"favit\">
<a class=\"favit\" href=\"".$results['link']. "\">fav it</a>
</li>
</ul>
</div>";
}
Last edited: