You are here: Re: Select/Join query help (dropdown box?) « PHP Programming Language « IT news, forums, messages
Re: Select/Join query help (dropdown box?)

Posted by Geoff Berrow on 07/09/05 03:35

I noticed that Message-ID:
<1120866465.469190.296750@z14g2000cwz.googlegroups.com> from
guitarromantic@gmail.com contained the following:

>How can I do what you suggested?

Let's assume you have defined a variable $Staff_id_db from your first
query

while($row2 = mysql_fetch_array($result2, MYSQL_NUM))
{
list($Staff_id, $Staff_Name) = $row2;
//check if this option should be selected
if($Staff_id==$Staff_id_db){
$selected=" selected";
}
else{
$selected="";
}

echo "<option
value=\"$Staff_id\"$selected>$Staff_Name</option>";
}
>
>Just to clarify, I really appreciate this help. I'm only a few weeks
>into php (does it show?!) and this is really helping me out.

Cool. :-) (But I'm going to bed now...)

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/

 

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

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