Hi,
got a dynamic dropdown, but the result in my second dropdown is some HTML. Seems to be a part of the template. See attached file.
Checked my function who loaded the data:
en got followed result who is returned:
So i don't know why i getting this strange html respons in my second dropdown box.
Someone an idea?
got a dynamic dropdown, but the result in my second dropdown is some HTML. Seems to be a part of the template. See attached file.
Checked my function who loaded the data:
<?php
$cfg = parse_ini_file('config.ini',true);
$db2 = new MySQLi($cfg['dbconn']['host'],$cfg['dbconn']['user'],$cfg['dbconn']['password'],$cfg['dbconn']['database']);
// get Playdates
$results = array();
$results[] = '0=Please select';
$query = "SELECT
teams_events.id as id,
concat(date_format(events.eventdate,'%d/%m/%Y'),' - ', events.description) as playdate
FROM
teams_events
INNER JOIN events ON (teams_events.eventID = events.id)
WHERE
events.seasonID = 3 AND
teams_events.clubID = 339 AND
teams_events.teamID = 2 AND
teams_events.complete = 'N' AND
events.eventdate < curdate()
ORDER BY
events.eventdate";
if ($rs = $db2->query($query)) {
/* fetch associative array */
while ($row = $rs->fetch_assoc()) {
$results[] = $row['id'].'='.$row['playdate'];
}
/* free result set */
$rs->free();
}
$results = implode("\n", $results);
echo $results;
$mainframe =& JFactory::getApplication();
$mainframe->close();
?>
en got followed result who is returned:
string '0=Please select
2=06/09/2013 - Interteams 1
5=13/09/2013 - Interteams 2
8=20/09/2013 - Interteams 3
11=27/09/2013 - Interteams 4
14=04/10/2013 - Interteams 5
17=11/10/2013 - Interteams 6' (length=186)
So i don't know why i getting this strange html respons in my second dropdown box.
Someone an idea?