Hi rayzun,
I don't think I quite understand you.
If ...
$PATH_INFO = 'domain.com/index.php/A/';
... then this ...
list($first) = explode('/', substr($PATH_INFO,1));
... sets $first to 'domain.com', not 'A'.
Best to get this straight before I try and help you.
Paul 🙂
PS. Just to let you know ...
$query = "SELECT DISTINCT male
FROM alpha
WHERE 1
AND male LIKE '$first%'";
... could just be written as ...
$query = "SELECT DISTINCT male
FROM alpha
WHERE male LIKE '$first%'";
... and ...
$result = mysql_query($query);
$number = mysql_numrows($result);
for ($i=0; $i<$number; $i++) {
$male=mysql_result($result,$i,"male");
echo "$male";
}
... could be written, more naturally, as ...
$result = mysql_query($query);
while($row = mysql_fetch_array($result)){
echo $row['male'];
}
EDIT: Used mysql_fetch_row ... actually meant mysql_fetch_array