Professional Documents
Culture Documents
Submitted to:-
Mrs. Neha Gulati
HOD of CSE Department
Submitted By:-
Sujata Maurya
Computer Science & Engineering
What is PHP?
• PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-
used open source general-purpose scripting language that is especially
suited for web development and can be embedded into HTML.
An introductory example
<!DOCTYPE html>
<html>
<head>
<title>Example</title>
</head>
<body>
<?php
echo "Hi, I'm a PHP script!";
?>
</body>
</html>
• PHP is a server side scripting language.
• Scripting language is that language which is
used to connect different application to each
other.
• PHP works in between the browser and the
server.
• Using PHP we perform
computational/server/database programming.
• It supports Object oriented programming
features.
HISTORY OF PHP
It is an open source technology and runs on most operating systems and with
most Web servers. PHP was written in the C programming language by
Rasmus Lerdorf in 1994 for use in monitoring his online resume and related
personal information. For this reason, PHP originally stood for "Personal
Home Page“
PHP/FI version 1.0 was never really used outside of Rasmus own web site.
With the introduction of PHP/FI 2.0 this began to change. When PHP 3 was
released in 1997, adoption of PHP exploded beyond all belief.
if($password!=$cpwd)
echo"<script>alert('Password mismatch')</script>";
else
{
//echo"<script>alert('Password match')</script>";
$qryl=mysqli_query($link,"select count(u_email)from registration_table
where u_email='$email'");
$rec=mysqli_fetch_array($qryl);
//echo $rec[0];
if($rec[0]==0)
$qry=mysqli_query($link,"insert into
registration_table(u_name,u_lastname,u_gender,u_email,u_password)values('$name','$lastna
me','$gender',
'$email','$password')");
else
echo "email alreaddy exist";
}
}
}
else
{
echo"connection error";
}
?>
STEP:-4 EXECUTE USING XAMPP
SERVER AND STORE DATA INTO
DATABASE
SNAPSHOTS OF PROJECTS
Contact.php
CODE FOR UPLOAD PIC
<?php
$link=mysqli_connect("localhost","root","", "form")or die("Connection error");
if (isset($_POST['btn']))
{
$error=$_FILES['file1']['error'];
$type=$_FILES['file1']['type'];
//echo $type;
move_uploaded_file($tmpname,"img/".$filename);
if($qry)
echo "File Uploaded...";
else
echo "File Not Uploaded...";
}
}
// fetch img............
$getimg=mysqli_query($link,"select * from upload_pic");
while($rec=mysqli_fetch_array($getimg))
{
echo "<img src='img/$rec[1]';>";
}
}
?>
Conclusion
• PHP overcomes the problem of the HTML
which is only used to design and structure the
Web pages.
• Using the PHP we can Store the information on
the server and also access the information
from the server.
• Using the PHP we can store the data into the
database and also access the data from the
databse.
THANK YOU!!...