You are here: New problem for Newbie « PHP Programming Language « IT news, forums, messages
New problem for Newbie

Posted by jsd219 on 06/14/07 16:23

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

 

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

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