| Sr.No | Assignment name |
|---|---|
| Set-A | |
| 1 |
Write a PHP script to accept font name, background color, and welcome message on 1 page.Display the welcome message with the given font and background color on the next page. Plz Click on Question to see Answer<html> <body> <form method="post" action="page2.php"> font name: <input type="text" name="t1"><br> background color: <input type="text" name="t2"><br> Welcome message: <input type="text" name="t3"><br> <input type="submit" value="ok"> </form> </body> </html> <?php $f=$_POST["t1"]; $c=$_POST["t2"]; $m=$_POST["t3"]; echo("<body bgcolor=$c>"); echo("<font face=$f>"); echo("Message=".$m); ?> |
| 2 |
Write a PHP program to accept name, address,pincode, gender information. If any field.it is blank display error messages "all fields are required". Plz Click on Question to see Answer<html> <body> <form method="post" action="address.php"> enter name: <input type="text" name="t1"><br> enter address: <input type="text" name="t2"><br> enter pincode: <input type="text" name="t3"><br> enter gender: <input type="text" name="t4"><br> <input type="submit" value="ok"> </form> </body> </html> <?php $n=$_POST["t1"]; $a=$_POST["t2"]; $p=$_POST["t3"]; $g=$_POST["t4"]; if($n==""||$a==""||$p==""||$g=="") die("all field are required..."); echo("<br>name=".$n); echo("<br>address=".$a); echo("<br>pincode=".$p); echo("<br>gender=".$g); ?> |
| 3 |
Write a php script to accept employee details(name,address)and earning details(basic,DA,HRA).Display employee details and earning details in the proper format. Plz Click on Question to see Answer<html> <body> <form method="post" action="basic.php"> enter name: <input type="text" name="t1"><br> enter address: <input type="text" name="t2"><br> enter basic salary: <input type="text" name="t3"><br> enter DA: <input type="text" name="t4"><br> enter HRA: <input type="text" name="t5"><br> <input type="submit" value="ok"> </form> </body> </html> <?php $n=$_POST["t1"]; $a=$_POST["t2"]; $bs=$_POST["t3"]; $da=$_POST["t4"]; $hra=$_POST["t5"]; $tsal=$bs + $da + $hra; echo("<table border=1>"); echo("<tr>"); echo("<td>Name</td>"); echo("<td>$n</td>"); echo("</tr>"); echo("<tr>"); echo("<td>Address</td>"); echo("<td>$a</td>"); echo("</tr>"); echo("<tr>"); echo("<td>Basic salary</td>"); echo("<td>$bs</td>"); echo("</tr>"); echo("<tr>"); echo("<td>DA</td>"); echo("<td>$da</td>"); echo("</tr>"); echo("<tr>"); echo("<td>HRA</td>"); echo("<td>$hra</td>"); echo("</tr>"); echo("<tr>"); echo("<td>Total salary</td>"); echo("<td>$tsal</td>"); echo("</tr>"); echo("</table>"); ?> |
| Set-B | |
| 1 |
Write a PHP script to accept customer name and the list of product and quantity on the first page.On the next page display the name of the customer, name of the products,rate of the product,quantity, and total price in table format Plz Click on Question to see Answer<html> <body> <form method="post" action="product.php"> enter customer name: <input type="text" name="t1"><br> enter product 1: <input type="text" name="t2"> Qty: <input type="text" name="t3"> Price : <input type="text" name="t4"><br> enter product 2: <input type="text" name="t5"> Qty: <input type="text" name="t6"> Price : <input type="text" name="t7"><br> enter product 3: <input type="text" name="t8"> Qty: <input type="text" name="t9"> Price : <input type="text" name="t10"><br> <input type="submit" value="ok"> </form> </body> </html> <?php $n=$_POST["t1"]; $p1=$_POST["t2"]; $q1=$_POST["t3"]; $pr1=$_POST["t4"]; $tot1=$q1*$pr1; $p2=$_POST["t5"]; $q2=$_POST["t6"]; $pr2=$_POST["t7"]; $tot2=$q2*$pr2; $p3=$_POST["t8"]; $q3=$_POST["t9"]; $pr3=$_POST["t10"]; $tot3=$q3*$pr3; $t=$tot1 + $tot2 + $tot3; echo("<h1>shop bill</h1>"); echo("<h4>customer name=$n</h4>"); echo("<table border=1>"); echo("<tr><th>product name<td>quantity<td>price<td>total</tr>"); echo("<tr><td>$p1<td>$q1<td>$pr1<td>$tot1</tr>"); echo("<tr><td>$p2<td>$q2<td>$pr2<td>$tot2</tr>"); echo("<tr><td>$p3<td>$q3<td>$pr3<td>$tot3</tr>"); echo("<tr><td>total amount<td>Rs<td>$t</tr>"); echo("</table>"); ?> |
| 2 |
Write HTML code to design multiple choice question paper for PHP subject.Display question wise marks and total marks received by the student in table format. Plz Click on Question to see Answer<html> <body> <form method ="post" action="bq2.php"> 1.Who is the father of Php?<br> <input type ="radio" name="q1" value="Drek Kolkevi">a)Drek Kolkevi <br> <input type ="radio" name="q1" value="Rasmus Lardorf">b)Rasmus Lardorf <br> <input type ="radio" name="q1" value="Willam Makepiece">c)Willam Makepiece <br> <input type ="radio" name="q1" value="List Barely">d)List Barely <br><br><br> 2.What dose php stands for ?<br> <input type="radio" name="q2" value="preproessor Home Page"> a)preproessor Home Page <br> <input type="radio" name="q2" value="Pretext Hypertext processor"> b)Pretext Hypertext processor<br> <input type="radio" name="q2" value="Hypertext preprocessor"> c)Hypertext preprocessor <br> <input type="radio" name="q2" value="Personal Hyper Processor"> d)Personal Hyper Processor<br> <input type= "submit" value="Submit Test"> </form> </body> </html> <?php $ans1=$_POST["q1"]; $ans2=$_POST["q2"]; $mark=0; echo("<table border=1>"); if($ans1=="Rasmus Lardorf") { echo("<tr><td>Q.no 1<td> marks=1</tr>"); $mark=$mark+1; } else { echo("<tr><td>Q.no 1<td>marks=0</tr>"); } if($ans2=="Hypertext Preprocessor") { echo("<tr><td>Q.no 2<td> marks=1</tr>"); $mark=$mark+1; } else { echo("<tr><td>Q.no 2<td>marks=0</tr>"); } echo("<tr><td> Total Marks<td> $mark </tr>"); echo("</table>"); ?> |
| 3 |
Write a PHP script to accept student name and list of programming languages (using dropdown box) and display it on the next page in the proper format. Plz Click on Question to see Answer<html> <body> <form method="post" action="subject.php"> enter name: <input type="text" name="t1"><br> Select language: <select name="s1"> <option value="C">C</option> <option value="CPP">CPP</option> <option value="JAVA">JAVA</option> <option value="PHP">PHP</option> </select><br> <input type="submit" value="ok"> </form> </body> </html> <?php $name=$_POST["t1"]; $sub=$_POST["s1"]; echo("<br> name=".$name); echo("<br> language=".$sub); ?> |
| 4 |
Write a PHP script to accept user name, email address and age. If data entered by the user is valid then display it on the next page otherwise display the appropriate message(use filter_var()). Plz Click on Question to see Answer<html> <body> <form method="post" action="disp_user.php"> enter user name: <input type="text" name="t1"><br> enter email address: <input type="text" name="t2"><br> enter age: <input type="text" name="t3"><br> <input type="submit" value="ok"> </form> </body> </html> <?php $name=$_POST["t1"]; $email=$_POST["t2"]; $age=$_POST["t3"]; if($name=="") die("must enter name"); if(filter_var($email,FILTER_VALIDATE_EMAIL)==false) die("invalide email id"); if(filter_var($age,FILTER_VALIDATE_INT)==false) die("invalide age"); echo("<br> name=".$name); echo("<br> email id=".$email); echo("<br> age=".$age); ?> |
| Set-C | |
| 1 |
A web application that takes name and age from an HTML page.
If the age is less than 18, it should send a page with
"Hello
|
- Home
- SYLLABUS
- _FYBBA(CA)
- __DBMS
- __WEB TECHNOLOGY
- _SYBBA(CA)
- __PHP
- __ADVANCE PHP
- _TYBBA(CA)
- __CORE JAVA
- __ADVANCE JAVA
- NOTES
- _Database System
- __CHAPTER1
- __CHAPTER 2
- _Web Technology
- __Chapter-1
- __Chapter-2
- __Chapter-3
- _Advance PHP
- __Chapter-1
- __Chapter-2
- __Chapter-3
- Research
- About us
- Assignment
- certificate
- Solved Programs
- Problem
- _Lab Book
- _Practical Slips
- _Assignment Submit
- _Project Guideline
- __SYBBACA SEM-IV
- __TYBBACA SEM-V
- __TYBBACA SEM-VI
- _C language
- __Simple Program
- __Simple Program
0 Comments