FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » populate pulldownbox from query
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: populate pulldownbox from query [message #174077 is a reply to message #174070] Sat, 21 May 2011 02:36 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 5/20/2011 6:56 PM, Co wrote:
> On 21 mei, 00:44, Chuck Anderson<cycletour...@invalid.invalid> wrote:
>> Michael Fesser wrote:
>>> .oO(Denis McMahon)
>>
>>>> On Fri, 20 May 2011 15:13:01 -0400, Jerry Stuckle wrote:
>>
>>>> > On 5/20/2011 2:30 PM, Co wrote:
>>
>>>> >> echo "<option value=$partner>$nt[rank] $nt[firstname] $nt[lastname]</
>>>> >> option>";
>>
>>>> > echo "<option value=$partner>{$nt[rank]} {$nt[firstname]}
>>>> > {$nt[lastname]}</option>";
>>
>>>> Hmm
>>
>>>> I thought:
>>
>>>> echo "<option value='$partner'>{$nt['rank']} {$nt['firstname']}
>>>> {$nt['lastname']}</option>";
>>
>>> Correct.
>>
>>>> But I'm failing to find an appropriate page in the manual for a
>>>> definitive answer.
>>
>>> Complex (curly) syntax
>>> http://www.php.net/manual/en/language.types.string.php#language.types...
>>
>>> Micha
>>
>> Since constants are not evaluated within strings, the quotes on array
>> keys and curly braces are not needed.
>>
>> (fromhttp://www.php.net/manual/en/language.types.array.php)
>> // The following is okay, as it's inside a string. Constants are not
>> looked for
>> // within strings, so no E_NOTICE occurs here
>> print "Hello $arr[fruit]"; // Hello apple
>>
>> The OP's original syntax is valid.
>> echo "<option value=$nt[id]>$nt[rank] $nt[firstname]
>> $nt[lastname]</option>";
>>
>> The formatting of the "<option ..." line is not the problem.
>>
>> I'd put print_r($nt) within the while loop and look at the query results.
>>
>> --
>> *****************************
>> Chuck Anderson Boulder, CO
>> http://cycletourist.com
>> Turn Off, Tune Out, Drop In
>> *****************************
>
> Chuck,
>
> you are right. All the values get loaded in the listbox.
> However the box itself stays empty. That shouldnt be.
> There should be the name of the partner of the user in there.
> Because it is represented by a numeric value, I think it gives a
> problem.
>
> Marco

Marco, that part is strictly an HTML problem. Try alt.html.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: he
Next Topic: Detecting Redirected Output
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 10 09:29:16 GMT 2024

Total time taken to generate the page: 0.04083 seconds