[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-windows
Subject:    RE: [PHP-WIN] PHP and HTML
From:       "Gryffyn, Trevor" <TGryffyn () air-cargo-inc ! com>
Date:       2004-08-20 19:45:22
Message-ID: B97E3961173C4943BF7C722DFE31943D014CD424 () irmailee1024 ! root ! aircargo ! com
[Download RAW message or body]

I got it the first time, so guess it went through.

I don't remember if it needs to be this strict or not, but I'd do it
this way:

Echo "<OPTION value=$Name>$Name</OPTION>";

Doensn't look like you're ECHOing or otherwise outputting the OPTION tag
and I usually include a "value=" with my options.

No need to use the "." to concatenate a simple variable like that, if
the "$Name" is in the quotes, it'll get interpreted.

Hope this helps!

-TG



> -----Original Message-----
> From: Chuck [mailto:cmorris@threesource.tv] 
> Sent: Friday, August 20, 2004 3:41 PM
> To: php-windows@lists.php.net
> Subject: [PHP-WIN] PHP and HTML
> 
> 
> Sorry if this was posted twice.  I don't think the first one 
> went thru.
> 
> Hello everyone.  I have the following script that creates a 
> listbox.  My box
> appears, but I can't get any data into it.  Can someone let 
> me know what I'm
> doing wrong.
> 
>     <SELECT name="Company List" multiple size="8">
>     <?php
>       $db = new COM("ADODB.Connection");
>       $dsn = "DRIVER=SQL Server; SERVER=D63WV941;UID=sa;PWD=sa;
> DATABASE=BINDER";
>       $db->Open($dsn);
>       $rs = $db->Execute("SELECT * from company");
>       while (!$rs->EOF)
>       {
>         $Name = $rs->Fields['Name']->Value;
>         // This doesn't get listed.
>         "<OPTION>".$Name;
>         $rs->MoveNext();
>       }
>     ?>
>     </SELECT>
> 
> I appreciate the help,
> Chuck
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic