Re: [SOLVED] Question: Repopulating form parameters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--- Jason Wong <php-general@xxxxxxxxxxxx> wrote:


> I think will call it a day for this thread.

As I suspected a loop was needed to make this work. 
In the event that there are other idiots, such as
myself, that don't immediately figure out the exact
logic I'll post the code:

//The sql is Adodb syntax:
while(!$rsinds->EOF){
?>
    <option value="<?php echo
$rsinds->Fields('CareerIDs')?>"

//I could test for $inds here, doesn't seem to make a
//difference
<?php foreach ($inds as $a) { ?> 
	<?php if ($rsinds->Fields('CareerIDs')== $a) {echo
"SELECTED";} } ?>>
	<?php echo $rsinds->Fields('CareerCategories') ?>
</option>
 <?php
    $rsinds->MoveNext();
  }
  $rsinds->MoveFirst();

Stuart

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux