diff options
author | Sudipto Mallick <smlckz@termux-alpine> | 2024-02-08 11:08:33 +0000 |
---|---|---|
committer | Sudipto Mallick <smlckz@termux-alpine> | 2024-02-08 11:08:33 +0000 |
commit | 02884d29e4f5aea71364a203dcaecd53600d8aa4 (patch) | |
tree | 0047b71f3677132fd6319919233e8ce5da43ad6d /mysql-php/text | |
parent | 0ac38a6f4ce7144635525a5a73bf2946d2909fa6 (diff) | |
download | zadania-02884d29e4f5aea71364a203dcaecd53600d8aa4.tar.gz |
Complete PHP assignments
Diffstat (limited to 'mysql-php/text')
-rw-r--r-- | mysql-php/text/a1.typ | 13 | ||||
-rw-r--r-- | mysql-php/text/a2.typ | 8 | ||||
-rw-r--r-- | mysql-php/text/a3.typ | 13 | ||||
-rw-r--r-- | mysql-php/text/a4.typ | 17 | ||||
-rw-r--r-- | mysql-php/text/a5.typ | 42 |
5 files changed, 68 insertions, 25 deletions
diff --git a/mysql-php/text/a1.typ b/mysql-php/text/a1.typ index 416d56c..f4d918b 100644 --- a/mysql-php/text/a1.typ +++ b/mysql-php/text/a1.typ @@ -27,15 +27,4 @@ #align(center, image("/output/1/7.png", width: 80%)) ] -== Records in `STUDENTS_DB.STUDENT` -#table( - columns: 5, - [*`ROLL`*], [*`NAME`*], [*`CITY`*], [*`EMAIL`*], [*`DATE_OF_BIRTH`*], - [`24354946`], [`Hu Shengti`], [`Chengdu`], [`hst@m15342.cn`], [`2001-05-10`], - [`35464647`], [`Albert Rechtsburger`], [`Düsseldorf`], [`arb@gmx.de`], [`1999-06-17`], - [`76879140`], [`Nora Akagami`], [`Nara`], [`norakiki@mail.co.jp`], [`2002-07-04`], - [`78324598`], [`Grzegorz Brzezinski`], [`Łódź`], [`grzbrzski@fastmail.com`], [`1997-07-04`], - [`89764243`], [`Park Jihoon`], [`Busan`], [`pjh2346@naver.com`], [`2002-10-01`], - [`97381425`], [`Mark Sanders`], [`San Francisco`], [`marksanders@gmail.com`], [`2004-03-24`], -) - +#signature() diff --git a/mysql-php/text/a2.typ b/mysql-php/text/a2.typ index 1f3c115..869745c 100644 --- a/mysql-php/text/a2.typ +++ b/mysql-php/text/a2.typ @@ -10,5 +10,11 @@ ] #scos(2)[ - #image("/output/2.png", width: 100%) + #{ /* image("/output/2.png", width: 100%)*/ []} + === Login form + #image("/output/2/1.png", width: 80%) + === Display records on success + #image("/output/2/2.png", width: 90%) ] + +#signature() diff --git a/mysql-php/text/a3.typ b/mysql-php/text/a3.typ index 9f30e6c..4a48b48 100644 --- a/mysql-php/text/a3.typ +++ b/mysql-php/text/a3.typ @@ -14,15 +14,4 @@ #align(center, image("/output/3/2.png", width: 70%)) ] -== Records in `STUDENTS_DB.STUDENT` -#table( - columns: 5, - [*`ROLL`*], [*`NAME`*], [*`CITY`*], [*`EMAIL`*], [*`DATE_OF_BIRTH`*], - [`24354946`], [`Hu Shengti`], [`Chengdu`], [`hst@m15342.cn`], [`2001-05-10`], - [`35464647`], [`Albert Rechtsburger`], [`Düsseldorf`], [`arb@gmx.de`], [`1999-06-17`], - [`76879140`], [`Nora Akagami`], [`Nara`], [`norakiki@mail.co.jp`], [`2002-07-04`], - [`78324598`], [`Grzegorz Brzezinski`], [`Łódź`], [`grzbrzski@fastmail.com`], [`1997-07-04`], - [`89764243`], [`Park Jihoon`], [`Busan`], [`pjh2346@naver.com`], [`2002-10-01`], - [`97381425`], [`Mark Sanders`], [`San Francisco`], [`marksanders@gmail.com`], [`2004-03-24`], -) - +#signature() diff --git a/mysql-php/text/a4.typ b/mysql-php/text/a4.typ new file mode 100644 index 0000000..ec5d8e6 --- /dev/null +++ b/mysql-php/text/a4.typ @@ -0,0 +1,17 @@ +#import "/tpl.typ": * +#show: A => apply(A) +#set raw(lang: "php") +#set par(leading: 0.7em) + +#assignment(4)[ + Create an HTML form to input employee salary components such as Basic Pay, House Rent Allowance (HRA) percentage, Dearness Allowance (DA) percentage, and Professional Tax. Upon submission, the PHP script should calculate the HRA, DA, and Professional Tax for each employee based on the provided percentages and store these details in a database table named `Salary`. Ensure that records in the `Salary` table contain entries only for employee names and basic pay. Finally, display the stored salary records including employee names, basic pay, calculated HRA, DA, and Professional Tax. +] + +#scos(4, cont: true)[ + === Login form + #image("/output/4/1.png", width: 60%) + === Display records + #image("/output/4/2.png", width: 80%) +] + +#signature() diff --git a/mysql-php/text/a5.typ b/mysql-php/text/a5.typ new file mode 100644 index 0000000..4f63dfc --- /dev/null +++ b/mysql-php/text/a5.typ @@ -0,0 +1,42 @@ +#import "@preview/tablex:0.0.6": tablex, vlinex, hlinex +#import "/tpl.typ": * +#show: A => apply(A) +#set raw(lang: "php") +#set par(leading: 0.7em) + +#assignment(5)[ + Design a HTML form to take inputs from the user and store the records into a table `Employee` using a PHP script. The form should contain the following fields: + + #align(center, tablex( + columns: 2, + auto-lines: false, + hlinex(), + vlinex(), vlinex(), vlinex(), + [*Fields*], [*Form input control*], + hlinex(), + [`Ename`], [textbox], + [`Address`], [textarea], + [`Phno`], [textbox], + [`Salary`], [textbox], + [`Category` \ (out of GEN, SC, ST, OBC)], [radio buttons], + [`Language`], [checkbox], + hlinex(), + )) + (Multiple languages have to be concatenated into a string separated by commas and then stored into the database like `Bengali, English, Hindi`.) + + Once the form is submitted, the PHP script should process the input data and insert a new record into the `Employee` table in the database. Ensure that appropriate validation is implemented to handle user input correctly. + + Additionally, implement functionality to display the employee records from the `Employee` table. The records should be ordered based on the user's choice of field, which can be selected from a dropdown menu containing all fields of the table. Optionally, provide a checkbox to allow the user to specify descending order for the displayed records. +] + +#scos(5, cont: true)[ + === Menu + #align(center, image("/output/5/1.png", width: 20%)) + === Input Form + #align(center, image("/output/5/2.png", width: 30%)) + === Display records + #align(center, image("/output/5/3.png", width: 90%)) + #align(center, image("/output/5/4.png", width: 90%)) +] + +#signature() |