I have a page where I have listed the alphabets and made them clickable, pulling up a list of names. It is working except when you 1st go to the page it pulls all the data from the table. I want it to be blank until a letter is requested. What am I missing??
echo " <a href='artistHTML.php?alpha=A'>A</a>
<a href='artistHTML.php?alpha=B'>B</a> <a href='artistHTML.php?alpha=X'>X</a>
<a href='artistHTML.php?alpha=Y'>Y</a>
<a href='artistHTML.php?alpha=Z'>Z</a><br><br>";
$search=$_GET["alpha"];
$result = mysql_query("SELECT * FROM artist WHERE lastname like '$search%' ORDER by lastname");
$count = count(0);
while ($r=mysql_fetch_array($result))
{
$fullName=$r["fullName"];
$dob=$r["dob"];
$dod=$r["dod"];
$nationality =$r["nationality"];
$choosen_medium=$r["artForm"];
$artid=$r["artid"];
//display the row
echo $count++;
echo ". ".$fullName.", ".$nationality.", ".$dob."-".$dod." <br><br>";
}