You are here: Re: Help Please « PHP Programming Language « IT news, forums, messages
Re: Help Please

Posted by Jon Slaughter on 06/14/07 23:57

"jsd219" <info@musiclanerecording.com> wrote in message
news:1181863278.221161.148450@q19g2000prn.googlegroups.com...
>I am going crazy over here. here is my code:
>
> $query = "SELECT SEC_TITLE, SEC_ID
> FROM section
> WHERE SEC_TITLE != ''";
>
> $result = mysql_query($query);
>
> echo "<form action='#'>\r\n<select name='id'>";
> while ($line = mysql_fetch_array($result, MYSQL_NUM)) {
> $section = $line[0];
> $id = $line[1];
>
> //echo " <option value=$section>$section\r\n";
>
> echo " <option value='$id'>$section</option>\n";
>
> }
>
> I need to pull both a name=id & name=section. and then send both via
> the option value. What this does is it pulls all the section titles
> for the table section and places them into a drop down box, when you
> select one of the sections and send the form it places that section
> title in the section field of the category table. i need it to not
> only send the section title but also the section id to the id field of
> the category table.
>
> I am at a complete loss, Please someone help me
>

I can't make out what your talking about but maybe passing id and section in
the option value might work?

i.e., use something like $id.$seperator.$section? and then parse when you
get it

Jon

 

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

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