Category : WT LAB

10 – WRITE A PHP PROGRAM TO SORT THE STUDENT RECORDS WHICH ARE STORED IN THE DATABASE USING SELECTION SORT. SOLUTION  1  Requires XAMPP control panel for Solution 1 prog10.php <?php $servername = “localhost”; $username = “root”; $password = “”; $dbname = “weblab”; $conn = mysqli_connect($servername, $username, $password, $dbname); if (!$conn) { die(“Connection failed: ” . mysqli_connect_error()); } ..

Read more

5 -DESIGN AN XML DOCUMENT TO STORE INFORMATION ABOUT A STUDENT IN AN ENGINEERING COLLEGE AFFILIATED TO VTU. THE INFORMATION MUST INCLUDE USN, NAME, AND NAME OF THE COLLEGE, BRANCH, YEAR OF JOINING, AND EMAIL ID. MAKE UP SAMPLE DATA FOR 3 STUDENTS. CREATE A CSS STYLE SHEET AND USE IT TO DISPLAY THE DOCUMENT. SOLUTION  ..

Read more

3. WRITE A JAVASCRIPT CODE THAT DISPLAYS TEXT “TEXT-GROWING” WITH INCREASING FONT SIZE IN THE INTERVAL OF 100MS IN RED COLOR, WHEN THE FONT SIZE REACHES 50PT IT DISPLAYS “TEXT-SHRINKING” IN BLUE COLOR. THEN THE FONT SIZE DECREASES TO 5PT. SOLUTION  1 prog3.html<!DOCTYPE html><html><body> <div id=”h”></div> <script> var v = 0, f = 1,t=”TEXT-GROWING”,color; function a() { if(f==1) ..

Read more

8. WRITE THE PHP PROGRAMS TO DO THE FOLLOWING:A. IMPLEMENT SIMPLE CALCULATOR OPERATIONS.B. FIND THE TRANSPOSE OF A MATRIX.C. MULTIPLICATION OF TWO MATRICES.D. ADDITION OF TWO MATRICES. SOLUTION  1  &  SOLUTION  2 If xampp is in the system, save the program in C:xampphtdocs (start apache in xampp control panel)If no xampp in the system, save the program in C:Program FilesApache GroupApache2htdocs   & Open Google Chrome & type http://localhost/prog8a.phpprog8a.php<html> ..

Read more

1. WRITE A JAVASCRIPT TO DESIGN A SIMPLE CALCULATOR TO PERFORM THE FOLLOWING OPERATIONS: SUM, PRODUCT, DIFFERENCE, AND QUOTIENT. SOLUTION  1 prog1.html<html>    <title>CALCULATOR</title>    <style>        input{ width:100%; padding:40px; } input:hover{background: silver;}    </style>    <body>        <div align=”center”>        <h2>SIMPLE CALCULATOR</h2>        <script type=”text/javascript”>          ..

Read more

2. WRITE A JAVASCRIPT THAT CALCULATES THE SQUARES AND CUBES OF THE NUMBERS FROM 0 TO 10 AND OUTPUTS HTML TEXT THAT DISPLAYS THE RESULTING VALUES IN AN HTML TABLE FORMAT. SOLUTION  1 prog2.html<html><head><title> Squares and Cubes </title></head><script>    document.write(‘<p><b>SQUARES AND CUBES FROM 0 TO 10</b></p>’);    document.write(‘<table border=”2″ cellspacing=”2″>’);    document.write(‘<th> Number </th> <th> Square </th> ..

Read more

6. WRITE A PHP PROGRAM TO KEEP TRACK OF THE NUMBER OF VISITORS VISITING THE WEB PAGE AND TO DISPLAY THIS COUNT OF VISITORS, WITH PROPER HEADINGS. SOLUTION  1 1. If xampp is in the system, save the program in C:xampphtdocs (start apache in xampp control panel)2. If no xampp in the system, save the program in C:Program FilesApache GroupApache2htdocs   & Open ..

Read more

09. WRITE A PHP PROGRAM NAMED STATES.PY THAT DECLARES A VARIABLE STATES WITH VALUE “MISSISSIPPI ALABAMA TEXAS MASSACHUSETTS KANSAS”. WRITE A PHP PROGRAM THAT DOES THE FOLLOWING:A. SEARCH FOR A WORD IN VARIABLE STATES THAT ENDS IN XAS. STORE THIS WORD IN ELEMENT 0 OF A LIST NAMED STATESLIST.B. SEARCH FOR A WORD IN STATES THAT BEGINS ..

Read more

8. WRITE THE PHP PROGRAMS TO DO THE FOLLOWING:A. IMPLEMENT SIMPLE CALCULATOR OPERATIONS.B. FIND THE TRANSPOSE OF A MATRIX.C. MULTIPLICATION OF TWO MATRICES.D. ADDITION OF TWO MATRICES. SOLUTION  1  Requires XAMPP control panel for Solution 1 If xampp is in the system, save the program in C:xampphtdocs (start apache in xampp control panel)   & Open Google Chrome & type http://localhost/prog8b.php prog8b.php<!DOCTYPE html><html><body> <?php function pr($a){ ..

Read more

4. DEVELOP AND DEMONSTRATE A HTML5 FILE THAT INCLUDES JAVASCRIPT SCRIPT THAT USES FUNCTIONS FOR THE FOLLOWING PROBLEMS:A. PARAMETER: A STRINGB. OUTPUT: THE POSITION IN THE STRING OF THE LEFT-MOST VOWELC. PARAMETER: A NUMBERD. OUTPUT: THE NUMBER WITH ITS DIGITS IN THE REVERSE ORDER  SOLUTION  1  prog4.html <script> var a = prompt(“Enter The Query”),b = parseInt(a),z=0; if(b) { while(b>0) var ..

Read more