I've got quite a confusing one, which I'm sure is most likely a novice error.
I am using the following code:
<?php
include('authenticate.php');
$connection = mysql_connect("$host","$user","$password")
or die(mysql_error());
mysql_select_db("$txt_db_name",$connection)
or die(mysql_error());
$kmaker = $_GET['maker'];
$makers = (int) $kmaker;
{
$get_kits = mysql_query("
SELECT K.kitid AS kit_id,
K.kitname AS kit_name,
M.makerid AS maker_id
FROM 1st_kits K, 1st_makers M
WHERE (M.makerid AND K.kitmaker) = $kmaker
ORDER BY K.kitname",$connection)
or die(mysql_error());
}
{
while($data = mysql_fetch_array($get_kits))
{
echo"
<a href='kitstrips.php?maker=".$kmaker."&kit=".$data[kit_id]."'>$data[maker_name] $data[kit_name]</a><br>";
}
}
?>
It successfully displays the info I want it to, but unfortunately it displays each result (the kit name) three times! I don't know why.
Any ideas anyone?