



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Information about an advanced programming exam held at the national university of ireland, galway in 2009/2010. The exam is for the third year bsc in business information systems and covers the module ms315 - advanced programming. Instructions for the exam, questions, and requirements. Students are required to answer any three questions, all of which carry equal marks. The questions cover topics such as data encryption, installing and configuring php, and using arrays to solve programming problems.
Typology: Exams
1 / 6
This page cannot be seen from the preview
Don't miss anything!
Click Refresh (or Reload) to run this script again.
**(33.3 marks)**01 #!C:\Perl\bin\perl 02 # This file is authors.pl 03 # CGI program that generates book data 04 05 use CGI qw( :standard ); 06 use DBI; 07 use DBD::mysql; 08 09 $dtd = 10 "-//W3C//DTD XHTML 1.0 Transitional//EN" 11 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"; 12 13 print( header() ); 14 15 print( start_html( { dtd => $dtd, 16 title => "Authors" } ) ); 17 18 # 19 $databaseHandle = DBI->connect( "DBI:mysql:books", 20 "root", "a1ph3e", { RaiseError => 1 } ); 21 22 # 23 $query = "SELECT FirstName, LastName, AuthorID 24 FROM Authors ORDER BY LastName"; 25 26 # 27 # 28 $statementHandle = $databaseHandle->prepare( $query ); 29 $statementHandle->execute(); 30 31 print( h2( "Choose an author:" ) ); 32 33 print( start_form( { action => 'retrieve.pl' } ) ); 34 35 print( "<select name = "author">\n" ); 36 37 # 38 # 39 while ( @row = $statementHandle->fetchrow_array() ) { 40 print( "" ); 43 } 44 45 print( "\n" ); 46 47 print( submit( { value => 'Get Info' } ) ); 48 print( end_form(), end_html() ); 49 50 # 51 $databaseHandle->disconnect(); 52 $statementHandle->finish(); (33.3 marks)