Posts

Showing posts from December, 2023

05 HTML -Menu HTML record

Image
CREATE A MENU FORM USING HTML  PROGRAM:-5 Save:- html_menu5.html <html>     <head>         <title>select menu</title>     </head>     <body bgcolor="lightgreen">         <form> <br><br>             <label> SELECT BRANCH </label>             <select>                 <option value = "GAJUWAKA"> GAJUWAKA</option>                 <option value = "GOPALAPATNAM"> GOPALAPATNAM </option>                 <option value = "RAMNAGAR">RAMNAGAR </option>             </select...

04 HTML -Table-Alignment HTML record

Image
Using “table” tag, align the images as follows:   PROGRAM:-4 Save:-html_table_align4.html    <html>     <body bgcolor="skyblue">         <table border=2 align=center cellspacing=5>         <tr>             <caption align=center> <h1>ALIGNMENT OF IMAGES USING TABLE TAG</h1></caption>             <th>    <img src="images/4/1.png" height=150 width=150>                    <th>    <img src="images/4/2.png" height=150 width=150>                     <th>    <img src="images/4/3.png" height=150 width=150>       ...

03 HTML -Table HTML record

Image
 PROGRAM:-3  CREATE A TABLE WITH ROWS AND COLUMNS AND PLACE AN IMAGE IN ONE COLUMN  <html>     <head>          <title>TIMETABLE</title>      </head>      <body align="center" bgcolor="coral" text="yellow">          <p>TIMETABLE</p>          <table border="2" cellspacing="3" cellpadding="3" align="center" bgcolor="grey">          <tr>              <th>DAY</th>              <th>8:45-9:45</th>              <th>9:45-10:45</th>              <th>10:45-11</th>    ...

02 HTML-List HTML record

Image
PROGRAM:-2  Create an HTML document which consists of: Ordered List (b) Unordered List (c) Nested List (d) Image  CODE :- <html>     <body bgcolor=lightblue>         <img src="images/ibmlogo.jpg" align=right height="150" width="250"></img>         <font size=4 face="arial">         <center>             <h1>IBM Degree College</h1>             <h2>Courses offered</h2>         </center><br>         <hr size=4 color=red>         <h2>Order List</h2>         <ol type="1">             <li>Data science</li>    ...

01 HTML -Tags HTML record

Image
01 Create an HTML document with the following formatting options:  (a) Bold, (b) Italics, (c) Underline, (d) Headings (Using H1 to H6 heading styles), (e) Font (Type, Size and Color), (f) Background (Colored background/Image in background), (g) Paragraph, (h) Line Break, (i) Horizontal Rule, (j) Pre tag   Program:- 01 Save:- html_tags.html <html>     <head>         <title>first program</title>     </head>     <body bgcolor="lightyellow">         <b>This is bold text</b><br>         <i>This is italic text</i><br>         <u>This is underlined text</u><br>          <h1>This is heading 1</h1>          <h2>This is heading 2</h2>  ...

13 employee personal details Form PHP

Image
  Note:- two program 01-employee person 02-employee details save employee .php program:-01 <html> <body> <form action=emp_details.php method=get> <table border=0 align=center> <tr><td>Emp Name</td><td><Input type=text name='ename'></td> <tr><td>Desg</td><td><Input type=text name='ed'></td></tr> <tr><td>Department</td><td> <select name="dep"> <option value=gp.jpg>abc</option> <option value="deft">deft</option> <option value="xyzl">xyzl</option> </select> </td></tr> <tr><td>Gender</td><td><Input type=Radio name='gen' value=Female>Female <input type=radio name='gen' value=Male>Male </td></tr> <tr><td>Salary</td><td><Input type=text name='esal'></td></t...

12 Registration Form PHP

Image
 12.Create Website Registration Form using textbox, checkbox, radiobutton, select, submit button. And display user inserted value in new PHP page. Note:- two program 01-registration 02-form save  registration.php program:-01   <html> <head> <title>Registration</title> <style> .main {  width:30%;  margin:2em auto;  border:2px solid black;  padding:1em; } .main input[type="submit"] {  width:95%;  border:1px solid black;  padding:.5em;  margin:.5em; } .main input[type="password"] {  width:95%;  border:1px solid black;  padding:.5em;  margin:.5em; } .main input[type="text"],.main input[type="email"] {  width:45%;  border:1px solid black;  padding:.5em;  margin:.5em; } </style> </head> <body> <div class="main">  <form method="post" action="form.php">  <h2>Student Registration</h2>   <input type="text" n...

11 PHP application to delete Rows in a Table Program PHP- record

Image
  Note:- four programs  01- index page, 02-connecting database, 03-editing in a table, 04-update table . save-- index .php   program:-01 <!DOCTYPE html> <html> <head> <title>Basic MySQLi Commands</title> </head> <body>     <div>         <form method="POST" action="add.php">             <label>UserId:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label><input type="text" name="userid"><br>             <label>Firstname:</label><input type="text" name="firstname"><br>             <label>Lastname:</label><input type="text" name="lastname"><br>             <label>E_Mail:&nbsp;&nbsp;&nbsp;</label...

10 PHP application to edit Rows in a Table Program PHP- record

Image
  Note:- four programs  01- index page, 02-connecting database, 03-editing in a table, 04-update table . save-- index .php   program:-01 <!DOCTYPE html> <html> <head> <title>Basic MySQLi Commands</title> </head> <body>     <div>         <form method="POST" action="add.php">             <label>UserId:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label><input type="text" name="userid"><br>             <label>Firstname:</label><input type="text" name="firstname"><br>             <label>Lastname:</label><input type="text" name="lastname"><br>             <label>E_Mail:&nbsp;&nbsp;&nbsp;</label...

09 PHP application to add new Rows in a Table Program PHP- record

Image
  Note:- Three programs  01- index page, 02-connecting database, 03-adding row in a table. save-- index .php   program:-01 <!DOCTYPE html> <html> <head> <title>Basic MySQLi Commands</title> </head> <body>     <div>         <form method="POST" action="add.php">             <label>UserId:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label><input type="text" name="userid"><br>             <label>Firstname:</label><input type="text" name="firstname"><br>             <label>Lastname:</label><input type="text" name="lastname"><br>             <label>E_Mail:&nbsp;&nbsp;&nbsp;</label><input ty...

08 PHP Server Connection and Create DataBase Program PHP- record

Image
  Create DataBase in XAMPP local Server MySql start server Open Chrome Browser  type- localhost/phpmyadmin/  Note:- click IBM DataBase follow 1,2,3 &4 options 3.option Querys CREATE TABLE `user` (   `userid` INT(11) NOT NULL AUTO_INCREMENT,   `firstname` VARCHAR(30) NOT NULL,   `lastname` VARCHAR(30) NOT NULL,   `E_mail` VARCHAR(30), PRIMARY KEY (`userid`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; save-- .PHP   program:-01  <?php $host = 'localhost'; $dbname = 'ibm_database'; $username = 'root'; $password = ''; try {     $pdo = new PDO("mysql:host=$host;dbname=$dbname", $username, $password);     $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);     echo 'Connected to the IBM database successfully!'; } catch (PDOException $e) {     echo 'Error connecting to the database: ' . $e->getMessage(); } ?> output:- 01  

07 Views Program PHP- record

Image
  sava--Views7.php   program:- <?php     session_start();     if(isset($_SESSION['views']))     $_SESSION['views'] = $_SESSION['views']+1; else     $_SESSION['views']=1;        echo"views = ".$_SESSION['views'];   ?> output:-01 output:-02    

06 cookie Program PHP- record

Image
sava--cookie6.php   program:-  <?php $cookie_name = "user"; $cookie_value = "IBM Degree College"; setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/"); // 86400 = 1 day ?> <html> <body> <?php if(!isset($_COOKIE[$cookie_name])) {   echo "Cookie named '" . $cookie_name . "' is not set!"; } else {   echo "Cookie '" . $cookie_name . "' is set!<br>";   echo "Value is: " . $_COOKIE[$cookie_name]; } ?> </body> </html> output:-01   output:-02  

PHP Images

Image
 

05 Matrix multiple deminsions Program PHP- record

Image
  sava--matrix5.php   program:- <?php function multiply(&$mat1, &$mat2, &$res) {     $N = 4;     for ($i = 0; $i < $N; $i++)     {         for ($j = 0; $j < $N; $j++)         {             $res[$i][$j] = 0;             for ($k = 0; $k < $N; $k++)                 $res[$i][$j] += $mat1[$i][$k] * $mat2[$k][$j];         }     } } $mat1 = array(array(1, 1, 1, 1),array(2, 2, 2, 2),array(3, 3, 3, 3),array(4, 4, 4, 4)); $mat2 = array(array(1, 1, 1, 1),array(2, 2, 2, 2),array(3, 3, 3, 3),array(4, 4, 4, 4)); multiply($mat1, $mat2, $res); $N = 4; echo ("Result matrix :<br>"); for ($i = 0; $i < $N; $i++) {     for ($j = 0; $j < $N; $j++)  ...

04 Student Mark List Program PHP- record

Image
Note:- Two programs  01- Student form 02-Result details ... save-- result4a .PHP   program:-01 <html>    <form action="student4b.php">       <table>          <caption>STUDENT MARKSHEET FORM</caption>          <tr>             <td>School Name</td>             <td><input type="text" name="sn" size="30"></td>          </tr>          <tr>             <td>Student Name</td>             <td><input type="text" name="stn" size="30"></td>      ...