Re: calling a column into a popup

From: Date: Mon, 23 Apr 2001 14:28:55 +0000
Subject: Re: calling a column into a popup
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-8817@lists.php.net to get a copy of this message
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. thanks, boo > From: "Johannes Janson" <johannes.janson@gmx.de> > Date: Sun, 22 Apr 2001 21:49:36 +0200 > To: php-db@lists.php.net > 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

« previous php.db (#8817) next »