Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 1st, 2005, 11:41 AM   #1
domquem
Newbie
 
Join Date: Jun 2005
Posts: 7
Rep Power: 0 domquem is on a distinguished road
Send a message via Yahoo to domquem
Unhappy HELP!!! Perl script to display drop down menu on webpage

Perl script to display drop down menu on webpage after reading menu items from a mysql table.

I have a mysql table with a field called Course_name - has like 30 course names in it.
Now i need help as i am very green in perl, with a very simple script to access read the table then fetch the course names which will then need to e dispalyed dynamically in a webpage as Drop Down menu / combo box
.
All the30 course menu items should be displayed in the page after which someone can select any option and have the info about the particular choice they select being displayed.

Thanks for helping, will really appreciate.

__________________
:::::---DOMQUEM---::::
domquem is offline   Reply With Quote
Old Jun 1st, 2005, 11:42 AM   #2
domquem
Newbie
 
Join Date: Jun 2005
Posts: 7
Rep Power: 0 domquem is on a distinguished road
Send a message via Yahoo to domquem
please any help greatly apprecated
domquem is offline   Reply With Quote
Old Jun 1st, 2005, 12:44 PM   #3
big_k105
PFO Founder

 
big_k105's Avatar
 
Join Date: Mar 2004
Location: Fargo, ND
Posts: 1,650
Rep Power: 10 big_k105 is on a distinguished road
Send a message via AIM to big_k105 Send a message via MSN to big_k105 Send a message via Yahoo to big_k105
what do you know how to do in perl that you will need for this project? if you know how to access and get info from the db then it is just a matter of taking the info from the db and putting it into the html menu.

   #!/usr/bin/perl -w
   # Created by: Kyle Kjorsvik Date 1-26-04
   use CGI		qw/:standard/;
   use CGI::Carp	qw/fatalsToBrowser/;
   use DBI;
   	$dbh = DBI->connect("dbi:Pg:dbname=".$dbname." host=127.0.0.1", "username","pass")
   		or die "Can't connect to database\n";
   	$sth1 = $dbh->prepare("SELECT * FROM dbtable WHERE something");
   	$sth1->execute;
   	if ($sth1->rows){
   		$i = 0;
   		while ((@tstnwk) = $sth1->fetchrow_array){
 			//move move stuff from db to variables you want them in
   			$i++;
   		}
   	}
   	$sth1->finish;

That code should work for connecting to a db but i dont have anything specific in there
your turn to write some code and if you need help please post it

oh and it normally takes more then 1 min for you to get help so you dont need to create another post to see if we are reading only 1 min after you created the thread. try and wait say like 4 hours
__________________
BIG K aka Kyle
Programming Forums
Kyle K Online

Please do not PM or email me programming questions. Post them in the forums instead.

Last edited by big_k105; Jun 1st, 2005 at 10:01 PM.
big_k105 is offline   Reply With Quote
Old Jun 1st, 2005, 1:11 PM   #4
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
going to add your Perl code to my code repository big_k
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Jun 1st, 2005, 3:50 PM   #5
big_k105
PFO Founder

 
big_k105's Avatar
 
Join Date: Mar 2004
Location: Fargo, ND
Posts: 1,650
Rep Power: 10 big_k105 is on a distinguished road
Send a message via AIM to big_k105 Send a message via MSN to big_k105 Send a message via Yahoo to big_k105
cool is there a link to the code repository on your site?
__________________
BIG K aka Kyle
Programming Forums
Kyle K Online

Please do not PM or email me programming questions. Post them in the forums instead.
big_k105 is offline   Reply With Quote
Old Jun 1st, 2005, 11:35 PM   #6
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
Yeah, its under the Code link on the menu... but requires membership on the site... still working on the code base structure and overall layout.... as of right now, its just a listing of whats currently available... still have hundreds of my progs to list on it, plus a few useful ones from others... i want to also have hte ability for members to upload code as well. should have a good structure up to par by this weekend.
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Jun 2nd, 2005, 6:36 AM   #7
domquem
Newbie
 
Join Date: Jun 2005
Posts: 7
Rep Power: 0 domquem is on a distinguished road
Send a message via Yahoo to domquem
thx

Thanks BIG_K for the snippet , working on it as of right now.
Sorry for the posting after a minute.
domquem is offline   Reply With Quote
Old Jun 2nd, 2005, 6:59 AM   #8
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
I've got about a dozen mini-apps you might wanna add to that repository, IR.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Jun 2nd, 2005, 9:48 AM   #9
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
Alright Ooble... When I get the upload portion available I'll IM you... Of course, credit will be given to you for anything you contribute. Thanks man.
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

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 On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:54 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC