You are here: Re: drop down populated by database « PHP Programming Language « IT news, forums, messages
Re: drop down populated by database

Posted by jsd219 on 06/07/07 20:13

On Jun 7, 1:11 pm, Geoff Berrow <blthe...@ckdog.co.uk> wrote:
> Message-ID: <1181238806.840842.284510@p47g2000hsd.googlegroups.com> from
> jsd219 contained the following:
>
> ><select name="category">
> ><option value="CAT"<?php include 'category.php' ?>></option> </select>
>
> >Can anyone tell me how to make this drop down populate from the
> >category php file?
>
> We need to see category.php.
>
> If this file produces an array (called say $categories) then you could
> do something like this:
>
> <select name="category">
> foreach ($categories as $category){
> echo "<option >$category</option>\n";}
>
> ?>
> </select>
> --
> Geoff Berrow (put thecat out to email)
> It's only Usenet, no one dies.
> My opinions, not the committee's, mine.
> Simple RFDshttp://www.ckdog.co.uk/rfdmaker/

Thank you, i have one more question now. :-) i need to see the results
from my table where column Category has anything in it. I am assuming
i would use a WHERE statement but i don't know how to tell it to look
for anything in the field.

God bless
jason

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация