Yeah
$db_host = "localhost";
$db_user = "jehzwins_user";
$db_pass = "user888";
$db_name = "jehzwins_results";
$conn = mysql_connect($db_host, $db_user, $db_pass) or die ('waaaaaaaaaa!');
mysql_select_db($db_name);
?>
for ($i=65; $i < 91; $i++)
{
echo "
the_permalink();
echo "?index=".chr($i)."\">“.chr($i).”“.” ”;
}
$index = (isset($_GET['index']) && !empty($_GET['index'])) ? $_GET['index'] : ‘A’;
$index = strtoupper(substr($index, 0, 1));
?>
Viewing exam results for index :
$query = "SELECT name FROM res_names WHERE name LIKE '".$index."%' ORDER BY name ASC";
$result = mysql_query($query);
if(mysql_num_rows($result) == 0) {
?>
No entries found for index
}
while($row = mysql_fetch_array($result))
{
echo html_entity_decode($row[name])."
“;
}
?>
