Re: Re: What am I doing wrong - PHP

From: Date: Sat, 13 Nov 2004 09:40:59 +0000
Subject: Re: Re: What am I doing wrong - PHP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-201898@lists.php.net to get a copy of this message
--- "M. Sokolewicz" <tularis@php.net> wrote: > I would suggest writing it like this: ............[snip] I'm getting the page now with the "box" but no values inside. Database conn is fine and all. I can print out the value , just can't get them to show up inside form element (Multiple select) Here is what I have Again, StaIndTypes is made up of CareerIDs [int] and CareerCategories [varchar] <?php mysql_select_db($database_Pmmodel, $Pmmodel); $inds = mysql_query("SELECT * FROM StaIndTypes", $Pmmodel) or die(mysql_error()); ?> <body> <form name="form1" id="form1" method="Post" action=""> <select name="Ind" size="10" multiple="multiple" id="Ind"> <?php //I tried MYSQL_ASSOC, NUM and BOTH, no diff while($row = mysql_fetch_array($inds, MYSQL_BOTH)) { echo '<option value="'.$inds['CareerIDs'].'">'.$inds['CareerCategories'].'</option>'; } echo '</select></form>'; Thanks Stuart

« previous php.general (#201898) next »