This should be in the PHP forum but,
PHP Code:
$first_char = $_GET['firstchar']
if ($first_char <> "") {
$sql="SELECT * FROM characters WHERE newsname LIKE '" . $first_char . "%' ORDER BY newsname
ASC";
} else {
$sql="SELECT * FROM characters ORDER BY newsname ASC";
}
and the links would be
HTML Code:
<a href="page.php?firstchar=a" >A</a>
Repeat as required
Not tested, coding at the keyboard (always dangerous  )
It could get a little more complicated if you want to use F to K for instance.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
|