You are here: Re: Challenge: MySql result to drop down box « All PHP « IT news, forums, messages
Re: Challenge: MySql result to drop down box

Posted by Jim S on 07/18/06 14:07

Ok--I found the problem. After beating my head on it for a few days I
realized the $username variable should have actually been $user_name O.o

Thank you for all who helped, I am sure the solutions I did implement
helped me to avoid other problems.

Jim S wrote:
> I think I am just missing something silly. I have tested my query and
> it seems to be functioning fine. I have another similar query that runs
> just before this one so the issue isn't a connection. If you have any
> other questions I'd be happy to answer them.
>
> Platform: mysql 3.x, php5
>
> <?php
> $res=mysql_query("SELECT job_name FROM oats_jobs_users_laborCode where
> user='$username' order by job_name");
> echo "<select name=jobname> <option default='default'>Choose
> One</option>";
> for ($i=0; $row=mysql_fetch_assoc($res); $i++)
> {
> echo "<option value='<? echo $row[0];?>'><? echo
> $row[0];?></option>";
> }
> echo "</select>";
> ?>

 

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

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