The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Thu May 10, 2012 9:40 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Aug 25, 2011 4:35 pm
Posts: 7
I'm relatively new so bear with me :)

I have several drop-down boxes to enter data in mysql, but have an odd issue that the 2nd box has a blank space on 1st row followed by "select...". Then 3rd box has 2 blank rows first etc.. This is how the code goes;

$query = "SELECT * FROM #__countries ORDER BY country";
$db->setQuery($query);
$country = $db->loadObjectList();

$cntr[] = JHTML::_('select.option', 0, JText::_('B_SELCOUNTRY'), 'id', 'country' );
$countries = array_merge($cntr,$country);
$lists['country'] = JHTML::_('select.genericlist', $countries, 'country_id', 'class="inputbox" size="1"', 'id', 'country', $row->country_id );

So the 1st row is "Select Country" followed by list of countries. But why do I get blank row on subsequent boxes' first row?

This has puzzled me the whole day now... :(


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 



Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group