0% found this document useful (0 votes)
8 views17 pages

Project Report

It is a report of micro project of php

Uploaded by

jaidbairagdar905
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views17 pages

Project Report

It is a report of micro project of php

Uploaded by

jaidbairagdar905
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

Shri Shamrao Patil (Yadravkar) Educational & Charitable Trust’s

SHARAD INSTITUTE OF TECHNOLOGY,


POLYTECHNIC.

DEPARTMENT OF COMPUTER
ENGINEERING

MICRO PROJECT REPORT


IN
FOR

Web Based Application Development


Using PHP
T.Y – 2020-2021
Shri Shamrao Patil (Yadravkar) Educational &
Charitable Trust’s

SHARAD INSTITUTE OF TECHNOLOGY


POLYTECHNIC, YADRAV-ICHALKARANJI.

DEPARTMENT OF COMPUTER
ENGINEERING

MICRO PROJECT REPORT


IN
(Web based application development using PHP)
FOR
Academic Year -2020-2021

Project Report on

“Student registration form using php”

Submitted in Partial Fulfillment of the requirements for the

“DIPLOMA Third Year”


In

Computer Engineering
To

M.S.B.T.E. MUMBAI.

By

Name of candidates Roll No.

Sakshi Annaso Patil 12401

Anjali Chandrakant Chillal 12402


Maithili Ananda Dudhane 12403

Snehal Kumar Dattawade 12404

UNDER THE GUIDANCE OF

Ms.P.R.Chougule
CERTIFICATE

This is to certify that,

Name of Student Roll No.

Sakshi Annaso Patil 12401

Have successfully completed the Project work entitled “Student registration form using
PHP” under my supervision, in the partial fulfillment of the requirements for the Diploma in
Computer Engineering, and the report submitted to M.S.B.T.E. MUMBAI. For academic year
2020-2021. Semester VI.

Date:
Place: S.I.T.Poly. Yadrav

Ms. P.R.Chougule Mr.R.M.Patil. Mr.B.S.Tashildar

project Guide Head of Dept. Principal


CERTIFICATE
This is to certify that,

Name of Student Roll No.

Anjali Chandrakant Chillal 12402


Have successfully completed the Project work entitled “Student registration form using PHP”
under my supervision, in the partial fulfillment of the requirements for the Diploma in
Computer Engineering, and the report submitted to M.S.B.T.E. MUMBAI. For academic year
2020-2021. Semester VI.

Date:
Place: S.I.T.Poly. Yadrav

Ms. P.R.Chougule Mr.R.M.Patil. Mr.B.S.Tashildar

project Guide Head of Dept. Principal


CERTIFICATE
This is to certify that,

Name of Student Roll No.

Maithili Ananda Dudhane 12403


Have successfully completed the Project work entitled “Student registration form using PHP”
under my supervision, in the partial fulfillment of the requirements for the Diploma in
Computer Engineering, and the report submitted to M.S.B.T.E. MUMBAI. For academic year
2020-2021. Semester VI.

Date:
Place: S.I.T.Poly. Yadrav

Ms. P.R.Chougule Mr.R.M.Patil. Mr.B.S.Tashildar

project Guide Head of Dept. Principal


CERTIFICATE
This is to certify that,

Name of Student Roll No.

Snehal Kumar Dattawade 12404


Have successfully completed the Project work entitled “Student registration form using PHP”
under my supervision, in the partial fulfillment of the requirements for the Diploma in
Computer Engineering, and the report submitted to M.S.B.T.E. MUMBAI. For academic year
2020-2021. Semester VI.

Date:
Place: S.I.T.Poly. Yadrav

Ms. P.R.Chougule Mr.R.M.Patil. Mr.B.S.Tashildar

project Guide Head of Dept. Principal

ACKNOWLEDGMENT

It is my great pleasure to present the honor and sincere gratitude to my guide


Ms.P.R.Chougle Sharad Institute of Technology Polytechnic, Yadrav helped in joining the
hands in developing each and every step of this project and for valuable guidance and constant
encouragement during completion of project work. It was my privilege and pleasure to work
under her valuable guidance. I am indeed gratefully to her for providing me helpful suggestions.
Due to his constant encouragement and inspiration I could complete my project work.

I am very thankful to Principal, Sharad Institute of Technology, Polytechnic, Yadrav. My


grateful thanks to Mr.R.M.Patil Head of Department, for their valuable guidance, support and
constant encouragement.

I express thanks to my family and friends for their support and encouragement at every
stage of successful completion of this project work.

My sincere thanks to all those who have directly or indirectly helped me to carry out this
work.

Name of the candidate Roll No

Sakshi Annaso Patil 12401

Anjali Chandrakant Chillal 12402

Maithili Ananda Dushane 12403

Snehal Kumar Dattawade 12404

INDEX
Sr.no Title Page no.
1 Introduction
2 Actual methodology followed

3 Aim

4 Course outcome achieved

5 Actual resources used

6 Output of micro project

7 Conclusion

8 Reference

Title: Student registration form using


PHP

1 Introduction (Brief introduction)-


An HTML form contains various input fields such as text box, checkbox, radio buttons,
submit button, and checklist, etc. These input fields need to be validated, which ensures
that the user has entered information in all the required fields and also validates that the
information provided by the user is valid and correct.
There is no guarantee that the information provided by the user is always correct. PHP
validates the data at the server-side, which is submitted by HTML form. You need to
validate a few things:
 Empty String
 Validate String
 Validate Numbers
 Validate Email
 Validate URL
 Input length

Empty String:
The code below checks that the field is not empty. If the user leaves the
required field empty, it will show an error message. Put these lines of code to
validate the required field.
Validate String:
The code below checks that the field will contain only alphabets and
whitespace, for example - name. If the name field does not receive valid
input from the user, then it will show an error message
Validate Number:
The below code validates that the field will only contain a numeric value. For
example - Mobile no. If the Mobile no field does not receive numeric data from
the user, the code will display an error message.
Validate Email:
A valid email must contain @ and . symbols. PHP provides various methods to
validate the email address. Here, we will use regular expressions to validate the
email address.
The below code validates the email address provided by the user through
HTML form. If the field does not contain a valid email address, then the code
will display an error message.
Input Length Validation:
The input length validation restricts the user to provide the value between the
specified range, for Example - Mobile Number. A valid mobile number must
have 10 digits.
The given code will help you to apply the length validation on user input.
The below code validates the URL of website provided by the user via HTML
form. If the field does not contain a valid URL, the code will display an error
message, i.e., "URL is not valid".
Button Click Validate:
Validates that the user click on submit button and send the form data to the
server one of the following method - get or post.
Now we will apply all these validations to an HTML form to validate the fields.
Thereby you can learn in detail how these codes will be used to validation form.
Create a registration form using HTML and perform server-side validation.
Follow the below instructions as given.
Fill the registration form and click on the Submit button. If all required
information is provided correctly, the output will be displayed on the same
page below the submit button.

2 Actual methodology followed (Methods used)-


 Empty String
 Validate String
 Validate Numbers
 Validate Email
 Validate URL
 Input length

3 Aim-
 To design student registration form using PHP .

4 Course outcome achieved-


 To develop student registration form using PHP.

5 Actual resources used (Resource Requirements)-

Name
Sr.no. Specifications Quantity Remarks
of Resources
Windows 7 or later version,
1. Computer System Yes
RAM minimum 2.0 GB, 1
Processor – Intel core i3 or i5

3 Setup XAMPP Server 1 Yes

https://www.javatpoint.com/
3. Websites form-validation-in-php Yes
1

Programming PHP-Author-
1
4. Reference Books Rasums Lerdorf, Kevin. T Yes
and Peter M.

6 Output of micro project


 Coding:
<!DOCTYPE html>
<html>
<head>
<style>
.error {color: #FF0001;}
</style>
</head>
<body>

<?php
// define variables to empty values
$nameErr = $emailErr = $mobilenoErr = $genderErr = $websiteErr = $agreeErr = "";
$name = $email = $mobileno = $gender = $website = $agree = "";

//Input fields validation


if ($_SERVER["REQUEST_METHOD"] == "POST") {

//String Validation
if (emptyempty($_POST["name"])) {
$nameErr = "Name is required";
} else {
$name = input_data($_POST["name"]);
// check if name only contains letters and whitespace
if (!preg_match("/^[a-zA-Z ]*$/",$name)) {
$nameErr = "Only alphabets and white space are allowed";
}
}

//Email Validation
if (emptyempty($_POST["email"])) {
$emailErr = "Email is required";
} else {
$email = input_data($_POST["email"]);
// check that the e-mail address is well-formed
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
$emailErr = "Invalid email format";
}
}

//Number Validation
if (emptyempty($_POST["mobileno"])) {
$mobilenoErr = "Mobile no is required";
} else {
$mobileno = input_data($_POST["mobileno"]);
// check if mobile no is well-formed
if (!preg_match ("/^[0-9]*$/", $mobileno) ) {
$mobilenoErr = "Only numeric value is allowed.";
}
//check mobile no length should not be less and greator than 10
if (strlen ($mobileno) != 10) {
$mobilenoErr = "Mobile no must contain 10 digits.";
}
}

//URL Validation
if (emptyempty($_POST["website"])) {
$website = "";
} else {
$website = input_data($_POST["website"]);
// check if URL address syntax is valid
if (!preg_match("/\b(?:(?:https?|ftp):\/\/|www\.)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-
z0-9+&@#\/%=~_|]/i",$website)) {
$websiteErr = "Invalid URL";
}
}

//Empty Field Validation


if (emptyempty ($_POST["gender"])) {
$genderErr = "Gender is required";
} else {
$gender = input_data($_POST["gender"]);
}
//Checkbox Validation
if (!isset($_POST['agree'])){
$agreeErr = "Accept terms of services before submit.";
} else {
$agree = input_data($_POST["agree"]);
}
}
function input_data($data) {
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
?>

<h2>Registration Form</h2>
<span class = "error">* required field </span>
<br><br>
<form method="post" action="<?php echo
htmlspecialchars($_SERVER["PHP_SELF"]); ?>" >
Name:
<input type="text" name="name">
<span class="error">* <?php echo $nameErr; ?> </span>
<br><br>
E-mail:
<input type="text" name="email">
<span class="error">* <?php echo $emailErr; ?> </span>
<br><br>
Mobile No:
<input type="text" name="mobileno">
<span class="error">* <?php echo $mobilenoErr; ?> </span>
<br><br>
Website:
<input type="text" name="website">
<span class="error"><?php echo $websiteErr; ?> </span>
<br><br>
Gender:
<input type="radio" name="gender" value="male"> Male
<input type="radio" name="gender" value="female"> Female
<input type="radio" name="gender" value="other"> Other
<span class="error">* <?php echo $genderErr; ?> </span>
<br><br>
Agree to Terms of Service:
<input type="checkbox" name="agree">
<span class="error">* <?php echo $agreeErr; ?> </span>
<br><br>
<input type="submit" name="submit" value="Submit">
<br><br>
</form>

<?php
if(isset($_POST['submit'])) {
if($nameErr == "" && $emailErr == "" && $mobilenoErr == "" && $genderErr == ""
&& $websiteErr == "" && $agreeErr == "") {
echo "<h3 color = #FF0001> <b>You have sucessfully registered.</b> </h3>";
echo "<h2>Your Input:</h2>";
echo "Name: " .$name;
echo "<br>";
echo "Email: " .$email;
echo "<br>";
echo "Mobile No: " .$mobileno;
echo "<br>";
echo "Website: " .$website;
echo "<br>";
echo "Gender: " .$gender;
} else {
echo "<h3> <b>You didn't filled up the form correctly.</b> </h3>";
}
}
?>

</body>
</html>
 Output Screenshot :
6 Conclusion-
 We are completed Student Registration From in PHP.
 We are create a where student can register themselves.Registration requires
everywhere, either we are filling any form or want to access any application. So
in this project we will see how to implement student registration in PHP
7 References:
https://www.javatpoint.com/form-validation-in-php

Book:-

Programming PHP-

Author- Rasums Lerdorf, Kevin. T and Peter M

You might also like