CrazyEngineers Forum

******************************************
Join CE! | CE Innovator Contest! | Forgot password?
Navigation
Go Back   CrazyEngineers Forum > CE : Technical Discussions > Computer Science & IT Engineering
Reply

  #1 (permalink)
Old 19th July 2008, 09:14 AM
hbk
CE - Apprentice
 
I'm a Crazy Computers Engineer
Join Date: 12th June 2008
Posts: 36
Default populating drop down from MySQL

hi guys.

i hav this drop down menu, which i need to populate with data from one column of a particular table of MySQL dbase.

i hav read a lot on this, but have not been able to come up wid any code.
any and all help in this regard will be greatly appreciated.

thx a ton.
__________________
2 ways to happines--->

1. Accept what you cannot change
2, Change what you cannot accept
hbk is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored links
  #2 (permalink)
Old 21st July 2008, 06:04 PM
CE - Regular Member
 
I'm a Crazy Electronics and Communication Engineer
Join Date: 19th March 2007
Location: Jeddah, Saudi Arabia
Posts: 69
Send a message via AIM to bayazidahmed Send a message via MSN to bayazidahmed Send a message via Yahoo to bayazidahmed
Default Re: populating drop down from MySQL

using PHP?
bayazidahmed is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)
Old 21st July 2008, 06:25 PM
hbk
CE - Apprentice
 
I'm a Crazy Computers Engineer
Join Date: 12th June 2008
Posts: 36
Default Re: populating drop down from MySQL

yes.... PHP = frontend, MySQL = backend...
__________________
2 ways to happines--->

1. Accept what you cannot change
2, Change what you cannot accept
hbk is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)
Old 21st July 2008, 06:48 PM
CE - Regular Member
 
I'm a Crazy Electronics and Communication Engineer
Join Date: 19th March 2007
Location: Jeddah, Saudi Arabia
Posts: 69
Send a message via AIM to bayazidahmed Send a message via MSN to bayazidahmed Send a message via Yahoo to bayazidahmed
Default Re: populating drop down from MySQL

i am supposing that u know how to create a databse connection using php. and u have the required field from the table in a resource. If you dont then tell me.

<SELECT NAME="someName">
<?PHP
while($row = mysql_fetch_array($resource, MYSQL_ASSOC))
{
?>
<OPTION VALUE=<?PHP echo $row['field']; ?>><?PHP echo $row['field']; ?>
<?PHP
}
?>
</SELECT>

Last edited by bayazidahmed : 21st July 2008 at 06:51 PM.
bayazidahmed is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored links
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +5.5. The time now is 06:17 AM.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Member comments are owned by the poster. Copyright © 2005-2008 CrazyEngineers.com. All rights reserved.Ad Management by RedTyger