I have a php script that connects to a database and makes a list or titles for games. now i want it to allow you to click one and it pull an summary from the database and hook display it.
[code=php]
<?php
$con = mysql_connect(//You don’t need to see this.//);
$id = 0;
if (!$con)
{
die(‘Could not connect: ‘ .mysql_error());
}
mysql_select_db(“main”, $con);
$result = mysql_query(“SELECT * FROM main.games”);
while($row = mysql_fetch_array($result))
{
$id + 1;
echo “<div class=title onclick=#sum” . $id . “style=display: block;>”;
echo “<div id=sum”;
echo $id;
echo ” style=display: none;>”;
echo $row[‘Summary’];
echo “</div>”;
echo $row[‘Name’];
echo “</div>”;
echo “<br>”;
}
mysql_close($con)
?>
I don’t think this will work but here it is.