SlideShare a Scribd company logo
2
Most read
9
Most read
21
Most read
Govt. Engineering College
        AJMER


             A training presentation on :
             PHP with MySql
Submitted to :                              Submitted By :
Mr. Vinesh Jain                             Ajeet Kr. Jhajharia
                                            09CS04
Content :
   Company Profile
   History of php
   What is php ?
   Features of php
   php code look like
   Php Contents
   Advantage of php
   MySql
CEG : Center for Electronic
          Governance



CEG is an autonomous body of the Govt. of
Rajasthan under the department of technical
Education.
Foundation stone of CEG was laid down on 8th
December 2006 at Khaitan Polytechnic College
Jaipur by Shri Ghanshyam Tiwari and Shri
Vasudev Devnani, Hon’ble Ministers for
Technical Education.
History of php :




 Created by Rasmus Lerdorf in 1994
 Originally a set of Perl scripts used by
 Lerdorf    to show off his résumé.
What is php ?



    php stands for “Hypertext
    PreProcessor” .
 An open source language .
 php is a server-side scripting language .
 php is used to generate dynamic web pages.
 php code can be embedded within an HTML
 page.
What is php ?



 „ViewSource‟ in browsers does not
 display the php code .
 phpsupports many popular databases
 such as MySql , Oracle and many
 more.
Features of php :


 Very Efficient :– Can serve millions of hits per day.
 Database Integration :– Supports many
 databases, such as
  MySql and Oracle.
    It’s Free :– Available on http://www.php.net
    Easy to Learn – Very similar in syntax to C and C++
    php uses both procedural and object oriented
    paradigms.
php codes look like ?

    Each PHP script must be enclosed in the
     reserved php tag .

         <?php

              …

         ?>
php Contents:

   Variables
   Constant
   Operators
   Array
   Functions
Variables :
  Variables are used for storing values, such
   as
  numbers, strings or function results, so that
they                  can be used many times
in a script.
  PHP variables must begin with a “$” sign
  Php variables are case-sensitive ($Sign!=
   $sign != $siGn)
◦ Certain variable names reserved by PHP
  like form variables
  ($_POST, $_GET), server variables
Operators :
 Arithmetic Operators (+,-,*,/)
 Example:- $total=$a+$b;


 Assignment Operators(=)
 Example:- $t=$a+$b;


 Comparison Operators (<, <=, >, >=)
 Logical Operators (&&. ||,!)
Arrays:
  <?php
  $arr = array("somearray" =>
   array(6 => 5, 13 => 9, "a" => 42));

   echo $arr["somearray"][6];       //
   5
   echo $arr["somearray"][13];      //
   9
   echo $arr["somearray"]["a"];    //
   42
Functions :
   Functions must be defined before then can
    be called

   Function headers are of the format

   function
    functionName($arg1,$arg2,………$argn)


    ◦ Note that no return type is specified
Function Example:
<?php
     function mul($arg1, $arg2)
 {
     $arg2 = $arg1 * $arg2;
    return $arg2;
   }
 $result = mul(12, 3);    // Store the
   function
 echo $result1;           // Outputs 36
?>
Advantage of php :


 Open  source
 Procedural / Object Oriented
  programming
 Supports wide range of Databases
 Easy to learn
 Portable
Why MySql ?



 Most  popular open-source DB
 Fast, reliable, scalable, etc.
 Integrated with common applications
 Based on SQL Standard
  ◦ Probably at least as compliant as other
    DBs
MySQL Query Basics

   mysql_connect() :-
       This function returns the connection on
success, or FALSE and an error on failure.
    mysql_select_db() :-
       The mysql_select_db() function sets the
active MySQL database.
MySQL Query Basics
   mysql_query() :-
    The mysql_query() function executes a query on a
MySQL database.
   mysql_num_rows() :-
      The mysql_num_rows() function returns the number
of rows in a recordset.
   mysql_fetch_array() :-
The mysql_fetch_array() function returns a row from a
recordset as an associative array and/or a numeric array.
Project Snapshots


             Project:

 Student Information System
php
php
php
php
php

More Related Content

PPTX
PPTX
Introduction to php
PPTX
Php.ppt
PPTX
Standard Enthalpy Changes of Reactions
PPT
Screenless Display PPT
PPTX
Installing printers
PDF
Php introduction
PDF
Introduction to TensorFlow 2.0
Introduction to php
Php.ppt
Standard Enthalpy Changes of Reactions
Screenless Display PPT
Installing printers
Php introduction
Introduction to TensorFlow 2.0

What's hot (20)

PDF
Introduction to php
PDF
Php Tutorials for Beginners
PPT
PHP - Introduction to Object Oriented Programming with PHP
PPT
Php Presentation
PPT
MYSQL - PHP Database Connectivity
PPTX
Introduction to php
PPT
Php with MYSQL Database
PDF
JavaScript - Chapter 12 - Document Object Model
PPT
Oops concepts in php
PPTX
Javascript event handler
PPSX
Php and MySQL
PPT
Class 3 - PHP Functions
PPTX
Node.js Express
PPTX
Loops PHP 04
PDF
Basics of JavaScript
PPTX
JSON: The Basics
PDF
javascript objects
PPT
Javascript
ODP
Introduction of Html/css/js
Introduction to php
Php Tutorials for Beginners
PHP - Introduction to Object Oriented Programming with PHP
Php Presentation
MYSQL - PHP Database Connectivity
Introduction to php
Php with MYSQL Database
JavaScript - Chapter 12 - Document Object Model
Oops concepts in php
Javascript event handler
Php and MySQL
Class 3 - PHP Functions
Node.js Express
Loops PHP 04
Basics of JavaScript
JSON: The Basics
javascript objects
Javascript
Introduction of Html/css/js
Ad

Viewers also liked (20)

PPT
Introduction to PHP
DOC
Php tutorial
PPT
Advantages of Choosing PHP Web Development
PPT
Php hypertext pre-processor
PPT
Php Ppt
PDF
Introduction to PHP
ODP
Linux commands
PPT
PHP Project PPT
ODP
Linux Introduction (Commands)
PDF
Php file handling in Hindi
PDF
PHP 5.3 - Funções
PDF
Advancing JavaScript with Libraries (Yahoo Tech Talk)
PPT
Php training in ahmedabad
PPTX
Php File Operations
PDF
PHP Course in pune , PHP Training in Pimpri chinchwad ,PHP training in Pune
PPTX
Client side scripting and server side scripting
PPTX
Php basics
PPTX
Shubham ppt on ospf and framerelay
Introduction to PHP
Php tutorial
Advantages of Choosing PHP Web Development
Php hypertext pre-processor
Php Ppt
Introduction to PHP
Linux commands
PHP Project PPT
Linux Introduction (Commands)
Php file handling in Hindi
PHP 5.3 - Funções
Advancing JavaScript with Libraries (Yahoo Tech Talk)
Php training in ahmedabad
Php File Operations
PHP Course in pune , PHP Training in Pimpri chinchwad ,PHP training in Pune
Client side scripting and server side scripting
Php basics
Shubham ppt on ospf and framerelay
Ad

Similar to php (20)

PPT
An Introduction to Websphere sMash for PHP Programmers
ODP
Exploring Symfony's Code
PPT
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
PPT
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
PPT
Php i basic chapter 3
PPT
Starting with PHP and Web devepolment
PPTX
working with PHP & DB's
DOCX
Php interview questions
PDF
Introduction to PHP - Basics of PHP
PDF
Advanced Php - Macq Electronique 2010
PDF
Current state-of-php
PDF
PHP Unit-1 Introduction to PHP
PDF
PHP Basics
PPS
Simplify your professional web development with symfony
PDF
DOCX
Php interview questions
ODP
Practical catalyst
An Introduction to Websphere sMash for PHP Programmers
Exploring Symfony's Code
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Php i basic chapter 3
Starting with PHP and Web devepolment
working with PHP & DB's
Php interview questions
Introduction to PHP - Basics of PHP
Advanced Php - Macq Electronique 2010
Current state-of-php
PHP Unit-1 Introduction to PHP
PHP Basics
Simplify your professional web development with symfony
Php interview questions
Practical catalyst

Recently uploaded (20)

PDF
Getting Started with Data Integration: FME Form 101
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Tartificialntelligence_presentation.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
A Presentation on Artificial Intelligence
PDF
Approach and Philosophy of On baking technology
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PPTX
Spectroscopy.pptx food analysis technology
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PPT
Teaching material agriculture food technology
PPTX
TLE Review Electricity (Electricity).pptx
Getting Started with Data Integration: FME Form 101
OMC Textile Division Presentation 2021.pptx
A comparative study of natural language inference in Swahili using monolingua...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Tartificialntelligence_presentation.pptx
Empathic Computing: Creating Shared Understanding
Diabetes mellitus diagnosis method based random forest with bat algorithm
A Presentation on Artificial Intelligence
Approach and Philosophy of On baking technology
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
SOPHOS-XG Firewall Administrator PPT.pptx
Spectroscopy.pptx food analysis technology
Univ-Connecticut-ChatGPT-Presentaion.pdf
Encapsulation_ Review paper, used for researhc scholars
Teaching material agriculture food technology
TLE Review Electricity (Electricity).pptx

php

  • 1. Govt. Engineering College AJMER A training presentation on : PHP with MySql Submitted to : Submitted By : Mr. Vinesh Jain Ajeet Kr. Jhajharia 09CS04
  • 2. Content :  Company Profile  History of php  What is php ?  Features of php  php code look like  Php Contents  Advantage of php  MySql
  • 3. CEG : Center for Electronic Governance CEG is an autonomous body of the Govt. of Rajasthan under the department of technical Education. Foundation stone of CEG was laid down on 8th December 2006 at Khaitan Polytechnic College Jaipur by Shri Ghanshyam Tiwari and Shri Vasudev Devnani, Hon’ble Ministers for Technical Education.
  • 4. History of php :  Created by Rasmus Lerdorf in 1994  Originally a set of Perl scripts used by Lerdorf to show off his résumé.
  • 5. What is php ?  php stands for “Hypertext PreProcessor” .  An open source language .  php is a server-side scripting language .  php is used to generate dynamic web pages.  php code can be embedded within an HTML page.
  • 6. What is php ?  „ViewSource‟ in browsers does not display the php code .  phpsupports many popular databases such as MySql , Oracle and many more.
  • 7. Features of php :  Very Efficient :– Can serve millions of hits per day.  Database Integration :– Supports many databases, such as MySql and Oracle.  It’s Free :– Available on http://www.php.net  Easy to Learn – Very similar in syntax to C and C++  php uses both procedural and object oriented paradigms.
  • 8. php codes look like ?  Each PHP script must be enclosed in the reserved php tag . <?php … ?>
  • 9. php Contents:  Variables  Constant  Operators  Array  Functions
  • 10. Variables :  Variables are used for storing values, such as numbers, strings or function results, so that they can be used many times in a script.  PHP variables must begin with a “$” sign  Php variables are case-sensitive ($Sign!= $sign != $siGn) ◦ Certain variable names reserved by PHP like form variables ($_POST, $_GET), server variables
  • 11. Operators :  Arithmetic Operators (+,-,*,/)  Example:- $total=$a+$b;  Assignment Operators(=)  Example:- $t=$a+$b;  Comparison Operators (<, <=, >, >=)  Logical Operators (&&. ||,!)
  • 12. Arrays: <?php $arr = array("somearray" => array(6 => 5, 13 => 9, "a" => 42)); echo $arr["somearray"][6]; // 5 echo $arr["somearray"][13]; // 9 echo $arr["somearray"]["a"]; // 42
  • 13. Functions :  Functions must be defined before then can be called  Function headers are of the format  function functionName($arg1,$arg2,………$argn) ◦ Note that no return type is specified
  • 14. Function Example: <?php function mul($arg1, $arg2) { $arg2 = $arg1 * $arg2; return $arg2; } $result = mul(12, 3); // Store the function echo $result1; // Outputs 36 ?>
  • 15. Advantage of php :  Open source  Procedural / Object Oriented programming  Supports wide range of Databases  Easy to learn  Portable
  • 16. Why MySql ?  Most popular open-source DB  Fast, reliable, scalable, etc.  Integrated with common applications  Based on SQL Standard ◦ Probably at least as compliant as other DBs
  • 17. MySQL Query Basics  mysql_connect() :- This function returns the connection on success, or FALSE and an error on failure.  mysql_select_db() :- The mysql_select_db() function sets the active MySQL database.
  • 18. MySQL Query Basics  mysql_query() :- The mysql_query() function executes a query on a MySQL database.  mysql_num_rows() :- The mysql_num_rows() function returns the number of rows in a recordset.  mysql_fetch_array() :- The mysql_fetch_array() function returns a row from a recordset as an associative array and/or a numeric array.
  • 19. Project Snapshots Project: Student Information System