Reply to Re: New problem for Newbie

Your name:

Reply:


Posted by ZeldorBlat on 06/14/07 17:31

On Jun 14, 12:23 pm, jsd219 <i...@musiclanerecording.com> wrote:
> here is my code:
>
> $query = "SELECT SEC_TITLE
> FROM section
> WHERE SEC_TITLE != ''";
>
> $result = mysql_query($query);
>
> echo "<form action='#'>\r\n<select name='section'>\r\n";
> while ($row = mysql_fetch_array($result, MYSQL_NUM))
> {
> echo " <option value='{$section[0]}'>$row[0]\r\n";
>
> }
>
> It works great but I need it to also select the ID from the section
> table without displaying it. so the client only sees a drop down box
> with the section titles but when they select one and send the form it
> will send both the section title and sec id
>
> I have tried changing the SELECT SEC_TITLE to SELECT SEC_TITLE, SEC_ID
> but i am lost from there.
>
> Anyone please :-)
>
> God bless
> jason

Change your query as you described above, then replace section[0] (not
sure what that was anyway) with row[1].

[Back to original 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

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