Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

PHP: Hypertext Preprocessor

No description
by

neha menon

on 30 August 2013

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of PHP: Hypertext Preprocessor

P
HP:
H
ypertext
P
reprocessor

HTML-embedded server side scripting language.
Created in 1995 by Rasmus Lerdorf.
Was initially called Personal Home Page.

PHP Versions
INTRODUCTION
PHP code is interpreted by a web server with a PHP processor module which generates the resulting web page:
PHP commands can be embedded directly into an HTML source document rather than calling an external file to process data.
PHP files can contain text, HTML, JavaScript code, and PHP code
PHP code are executed on the server, and the result is returned to the browser as plain HTML
PHP files have a default file extension of ".php"
LAMP Architecture
PHP 5
PHP 3


Zeev and Andi decided to completely rewrite the scripting language.
They then teamed up with Rasmus to release PHP 3, and along also came a new name: PHP: Hypertext Preprocessor.
At the time of PHP 3’s release in June 1998, the estimated PHP installed base consisted of about 50,000 domains.


PHP/FI 2
It was released in november 1997.
It failed to work out because of the way while loops were implemented.
PHP 4 came with a new paradigm of "compile first, execute later"
PHP 4 was officially released on May 22, 2002,
PHP 4
Submitted To: Mr. Mohit Khandelwal Submitted By: NEHA MENON
SUMMER TRAINING PROJECT
TITLE:
ISPAI ELECTION PORTAL

PROJECT
TITLE:
ISPAI ELECTION PORTAL
CONTENTS
HOME PAGE
LOGIN PAGE
NOMINATION PAGE
VOTE PAGE
ADMIN CONTROL PAGE
ADDITIONAL PAGES
HOME PAGE
LOGIN PAGE
HOME PAGE WITH DROP-DOWN
FOR ADMIN CONTROL
NOMINATION PAGE
VOTING PAGE
TO CHANGE THE LINK
THANK YOU
10eiacs083
Improved resource handling
Object-oriented support
Native session handling
Improved object oriented capabilities.
Try/Catch exception handling
Improved web service support
Improved string handling
better garbage collection
better static binding
Why is PHP better??
variables provided via http post
variables defined by Apache
variables provided by the environment
variables provided to the script via http session and cookies
variables are provided via http get(ie. they are in the url)
INSTITUTE OF ENGINEERING AND TECHNOLOGY
ALWAR

INTERNET SERVICE PROVIDERS ASSOCIATION OF INDIA

B-TECH (CS)
SESSION and COOKIES
A session is a way to store information (in the form of variables) to be used across multiple pages.
Cookies are stored in the user's browser, and sessions are not.
Cookies keep user information in the browser until deleted.
Sessions works like a token allowing access and passing information while the user has their browser open.
We lose the session when we close the browser.
$_GET and $_POST method
$_GET
Parameters remain in browser history because they are part of url.
Can be bookmarked.
Should not be used when sending passwords or other security information.
Maximum Size: 7607 characters.
Url example: page2.php?category=sport
Php basics
Php file is saved with a
.php
extension.
Every Php code is enclosed within
<?php .................... ?>
Can also be framed only by
<?
Single Line Comments can be written after
//
Multi-line comments can be enclosed within
/*
and
*/
PRINT and ECHO statements
These commands are used to output line of text.
In both the cases statements are enclosed within
".......... "
example
INPUT:
<?php echo "I like About" ?>
<?php print "I like About" ?>
OUTPUT:
I like About
$_POST
Parameters are not saved in browser history.
Can't be bookmarked.
It's used when sending passwords or other sensitive information.
Maximum Size: 8Mb
Url example: page2.php
VARIABLES
A variable in programming is used to represent another value.
In Php all variables start with
$
sign and it can be a
string
or a
numeric value
.
example:
<?php $a=1; $b=2; $c=$a.$b; echo $c;
//OUTPUT: 12

?>
<?php
$a="alexa";
//string value
$b=6;
//numeric value
?>
Variable value can also be an equation.
example:
<?php
$a = 3 + 5;
// value of $a=8
$b = 6 + $a;
// value of $b=14
?>
We can make a variable from a string using
{}
brackets.
example:
<?php
$a= "SomeVar";
$SomeVar= "test";
echo ${$a};
//OUTPUT: test
?>
We can combine values using a period
[.]

example:
FORM CREATION and DATABASE CONNECTIVITY
<?php
$
variablename
=$_POST["
name of the textbox
"];
// t1 in this case
$con=mysql_connect("
server name
","name of the user","
password
");
$db=mysql_select_db("
name of database
");
$query=mysql_query("
$query
");
$row=mysql_fetch_array(
$query
);
$count=mysql_num_rows(
$query
);
/*use in the code
.
.
.*/
?>
<form action="
filename
.php" method="
post
">
//create form as per requirement

<input type="
text
" name="
t1
">
<input type="
submit
" name="
s1
">
</form>
Project Incharge
CS-IT Department

1
2
3
4
5
6
7
8
9
10
11
13
14
15
16
18
19
12
17
21
22
28
23
24
25
26
27
28
29
31
42
32
44
33
38
NOMINATION LINK WITH NOTIFICATIONS
POST SELECTION PAGE
NOMINATION FORM DETAILS
VOTING LINK WITH NOTIFICATIONS
POST SELECTION PAGE
VOTE CASTING PAGE
LOGIN DETAILS PAGE FOR ADMIN
NOMINATION DETAILS OF USERS
POST SELECTION FOR VOTING DETAILS
VOTING DETAILS OF THE USER
ADDITIONAL DETAILS OF THE USER
PAGE TO SET NOTIFICATIONS DATES
USER INFORMATION DETAILS
EVALUATING RESULTS BY COUNTING VOTES
30
20
CONTACT DETAILS PAGE
NOTIFICATIONS PAGE
CHANGE PASSWORD PAGE
ADDITIONAL PAGES
at
34
35
36
37
DROP-DOWN NOTIFICATIONS
UPON CHANGING PASSWORD
IF VOTE IS CASTED AGAIN
Full transcript