



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Web Engineering Mid Notes By: Aqib Aziz
Q1: Form Validation:
There are two types of form validation.
Basic Validation:
In basic validation, we check the required fields are filled. If all fields are filled then basic validation is complete otherwise it shows error.
Data format Validation:
Data validation is the process of ensuring that a program operates on clean, correct and useful data. It uses routines, often called "validation rules" "validation constraints" or "check routines", that check for correctness, meaningfulness, and security of data that are input to the system.
Form Validation Code:
Registration Form
Registration Form
User Name:
Password:
Re type-Password:
Date of Birth:
Mobile No:
Email:
Date:
CNIC:
Gender: Male
Female
Select Country:
Select City:
QNO3: Types of Casecading Style Sheet:
CSS:
Most web pages are made from HTML , or hypertext markup language. This is the standard way to decorate plain web text with fonts, colors, graphic doodads, and hyperlinks (clickable text that magically transports the user somewhere else). But websites can get really big. When that happens, HTML is a very hard way to do a very easy thing. CSS (cascading style sheets) can make decorating web sites easy again!
Think of CSS as a kind of computer dress code. CSS mainly does just one thing: it describes how web pages should look. Even better, CSS can be easily separated from HTML, so that the dress code is easy to find, easy to modify, and can rapidly change the entire look of your web site. Like a dress code at school, you can change your CSS and the look of your students will change with it. Style sheets allow you to rapidly alter entire websites as you please, just like a fashion craze allows people to change with the times yet remain the same people. A really neat thing about CSS, is that it cascades. Each style you define adds to the overall theme, yet you can make the most recent style override earlier styles. For example, with CSS we can start by saying we want all of our text 12px (12 units) high. Later we can say we want it to be red, too. Still later, we can tell it we want one phrase to be in bold or italics, or blue rather than red. See? That's a cascade. Three Types of CSS CSS comes in three types:
Example:
This is a heading
This is a paragraph.
/* CSS Document */ .heading
Font-color=”red”; } .paragraph { Font-color=”green”; }
Internal : Styles are placed at the top of each web page document, before any of the content is listed. This is the next best thing to external, because they're easy to find, yet allow you to 'override' an external style sheet -- for that special page that wants to be a nonconformist! Example:
This is a heading
This is a paragraph.
$name=$_POST[;txtuname’]
$pass=$_POST[;txtpass’] $con=mysqli_connect(“localhost” ,”root”,””,”NCBA”); If(!con) { Die(“connection failed”,”mysqli_error()); } Else { $sql=” select * from personal”; $result= mysqli_querry($con,$sql); mysqli_num_rows($result); $dbusername = $row['$username_login']; $dbpassword = $row['$password_login']; if ($txtuname==$dbusername && $txtpass==$dbpassword) { { echo "You are in"; } else { echo "Invalid Username or Password "; }
}