That's almost it. I want to populate the menu automatically from the
database without having to manually modify the HTML. I believe the below
will pull the data but it doesn't modify the menu in HTML. I tried a few
things like using the variable name as the same as the co_name but the menu
always comes up blank unless I put an option name in the list. it doesn't
pass the variable for $co_name in the HTML.


> From: "Johannes Janson" <[EMAIL PROTECTED]>
> Date: Sun, 22 Apr 2001 21:49:36 +0200
> Subject: Re: [PHP-DB] calling a column into a popup
> Hi,
> let me get this right. What I understood is the following:
> 1. Your admin page where you enter the information of a company
> 2. A Page with a drop-down list where all the company names are listed.
> (These names should then be linked to an information page with more
> info?)
> 3. A page where new companies can be added.
> well the drop-down list you can do with a simple while and a select(html)
> like
> this:
> $result = mysql_query("SELECT companyName FROM companyTable ORDER BY
> companyName");
> echo "<select name=company>";
> while (list($c_name) = mysql_fetch_array($result)) {
> echo "<option name=$c_name]>$c_name</option>";
> }
> If this is what you want (what I'm not sure about) I'm glad I understood
> you. If not supply more detailed information.
> Cheers
> Johannes

PHP Database Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to