Meant to gather how many different crews there are in the club.
<?php
$username="joe";
$password="chickie";
$database="kcc_reg";
mysql_connect("mysql.fatcow.com",$username,$password);
mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM members";
$result=mysql_query($query);
$num = mysql_num_rows ($result);
//$name_last=mysql_result($result,"name_last");
$crew_lookup = ($_POST[ "crew"]);
echo "<p><font size='5' color='white'><center>The $crew Crew</center></font></p><br><hr>";
while ($i < $num) {
$id_num=mysql_result($result,$i, "id_num");
$name_first=mysql_result($result,$i,"name_first");
$name_last=mysql_result($result,$i,"name_last");
$name_nick=mysql_result($result,$i,"name_nick");
$crew=mysql_result($result,$i,"crew");
if ($crew == $crew_lookup){
//count how many on the crew
$j++;
//echo "<p>There are $j paddlers in the $crew</p><hr>";
//while ($j > 0){
echo "Paddler: $name_first $name_last</p>";
//$j--;
}
$i++;
}
/*
echo "<hr>Crew is $crew and the coach is $coach<br>Birthday is $birthdate<br>Telephone number: $telephone<br>e-Mail address is $e_mail<hr>Dues paid? $dues<br>Registered? $registration<br>Family plan? $family<br>Needs waiver? $waiver<br>HCRA card issued? $id_card<br>Need transfer paperwork? $transfer</br>Was given club T Shirt? $tshirt</br>Raffle tickets? $fund_ras_1<br>Huli Huli Chicken? $fund_ras_2<br>Lau Lau?$fund_ras_3<hr>Paddled in Clement D. Paiaina Regatta? $race_1<br>Paddled in King Kamehameha Regatta? $race_2<br>Paddled in Leeward Kai Fathers Day Regatta?$race_3<br>Paddled in Waimanalo Canoe Club Regatta? $race_4<br>Walter J. Macfarland Regatta? $race_5<br>Paddled in John D. Kaupiko Regatta? $race_6<br>Paddled in Oahu Championships? $race_7<br>Paddled in State Championships? $race_8<hr></br>Comments: $textareaName<br>";
*/
//echo "<p>J String is $j</p>";
mysql_close();
?>