seperate your layers. Create a database, display and action layer. For
example:

include qry_users.inc;
include dsp_users.inc;

in qry_users.inc get your data and store them into an array var:

while($row->user)
    user[] = $row->user;
}

Then in dsp_users get them out again:

foreach ($user AS $value)
    echo $value;
}

Of course you have to built your code around the foreach in dsp_user;

Hope this helps

Andy

--
----------------------------------------------------
http://www.globosapiens.net
Global Travellers Network!





"Electroteque" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi i am populating a list menu with mysql , i would like to find a way to
> populate a form with more than one of the same list menus in a for loop
>
>  <select name="type[]">
>        <?
>        while ($sample = $result->fetchRow(DB_FETCHMODE_ASSOC)) {
>        $typeID=$sample["typeID"];
>        $description=$sample["description"];
>     $sample_type[$sample['typeID']] = $sample["description"];
>     echo "\n<option value=\"$typeID\" $selected>$description</option>";
>     }
>     ?>
>     </select>
>
> i have this within a for loop but the list only shows up once and the
second
> one is empty because the select from the database is finished ,
>
> is there a way to put the information from mysql into arrays so i can use
it
> more than once and then i could do multiple populated list boxes ? let me
> know
>
>
>
>



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

Reply via email to