Current location: Hot Scripts Forums » Programming Languages » PHP » Calling MYSQL table & list entrys in dropdown menu


Calling MYSQL table & list entrys in dropdown menu

Reply
  #1 (permalink)  
Old 09-24-04, 01:27 PM
doublee313 doublee313 is offline
Newbie Coder
 
Join Date: Aug 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Calling MYSQL table & list entrys in dropdown menu

I have a database called "survey" in there I have a table called "surveylist" with the following entrys:

survey1
survey2
survey3

I want to grab those entry from surveylist and list them in a dropdown box in my code. I have the following code sofar, but am kind of lost. Can someone please help me fill in the blank? I'm a newbie, so please understand.


PHP Code:

// Connect to your MySQl server

        
$server "localhost";
        
$user "xxx";
        
$pass "aaa";

    
$conn mysql_connect ($server,$user,$pass) or die(mysql_error());

    
mysql_select_db ("surveys") or die(mysql_error());
    
$get mysql_query("SELECT * FROM surveylist"); 
    
$get mysql_num_rows($get); 
        echo 
"<option value=\"$row[0]\">$row[0]";
echo 
"<select name=survey>"
Reply With Quote
  #2 (permalink)  
Old 09-25-04, 04:29 AM
snaip's Avatar
snaip snaip is offline
iNET Interactive
 
Join Date: Nov 2003
Posts: 997
Thanks: 2
Thanked 7 Times in 6 Posts
__________________
Regards,
Ahmad Permessur
Team HotScripts
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
retrieve information from MYSQL through drop down list minglou PHP 3 04-03-09 09:43 PM
Dropdown menu + php + mysql = one lost newbie PsYch0 PHP 2 04-29-04 01:40 PM
Database table contents to email problem (PHP and MySQL) blokeofftheinternet PHP 2 04-29-04 09:34 AM
mysql database & dropdown menu lizzzz PHP 1 03-16-04 11:04 PM
Newbie MySQL fccolon PHP 2 03-16-04 10:54 AM


All times are GMT -5. The time now is 04:31 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.