SlideShare a Scribd company logo
1 of 24
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

What's hot

What's hot (20)

Php Presentation
Php PresentationPhp Presentation
Php Presentation
 
Php and MySQL
Php and MySQLPhp and MySQL
Php and MySQL
 
PHP - Introduction to PHP Fundamentals
PHP -  Introduction to PHP FundamentalsPHP -  Introduction to PHP Fundamentals
PHP - Introduction to PHP Fundamentals
 
01 Php Introduction
01 Php Introduction01 Php Introduction
01 Php Introduction
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Form Handling using PHP
Form Handling using PHPForm Handling using PHP
Form Handling using PHP
 
laravel.pptx
laravel.pptxlaravel.pptx
laravel.pptx
 
Chapter 02 php basic syntax
Chapter 02   php basic syntaxChapter 02   php basic syntax
Chapter 02 php basic syntax
 
What Is Php
What Is PhpWhat Is Php
What Is Php
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Model
 
Oops concepts in php
Oops concepts in phpOops concepts in php
Oops concepts in php
 
JavaScript: Events Handling
JavaScript: Events HandlingJavaScript: Events Handling
JavaScript: Events Handling
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NET
 
Javascript basics
Javascript basicsJavascript basics
Javascript basics
 
Javascript arrays
Javascript arraysJavascript arrays
Javascript arrays
 
Php with MYSQL Database
Php with MYSQL DatabasePhp with MYSQL Database
Php with MYSQL Database
 
An Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java ScriptAn Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java Script
 
PHP
PHPPHP
PHP
 

Viewers also liked

Php hypertext pre-processor
Php   hypertext pre-processorPhp   hypertext pre-processor
Php hypertext pre-processor
Siddique Ibrahim
 

Viewers also liked (20)

Php tutorial
Php tutorialPhp tutorial
Php tutorial
 
Advantages of Choosing PHP Web Development
Advantages of Choosing PHP Web DevelopmentAdvantages of Choosing PHP Web Development
Advantages of Choosing PHP Web Development
 
Php hypertext pre-processor
Php   hypertext pre-processorPhp   hypertext pre-processor
Php hypertext pre-processor
 
Php Ppt
Php PptPhp Ppt
Php Ppt
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Linux commands
Linux commandsLinux commands
Linux commands
 
PHP Project PPT
PHP Project PPTPHP Project PPT
PHP Project PPT
 
Linux Introduction (Commands)
Linux Introduction (Commands)Linux Introduction (Commands)
Linux Introduction (Commands)
 
Php file handling in Hindi
Php file handling in Hindi Php file handling in Hindi
Php file handling in Hindi
 
PHP 5.3 - Funções
PHP 5.3 - FunçõesPHP 5.3 - Funções
PHP 5.3 - Funções
 
Advancing JavaScript with Libraries (Yahoo Tech Talk)
Advancing JavaScript with Libraries (Yahoo Tech Talk)Advancing JavaScript with Libraries (Yahoo Tech Talk)
Advancing JavaScript with Libraries (Yahoo Tech Talk)
 
Php.ini
Php.iniPhp.ini
Php.ini
 
Php training in ahmedabad
Php training in ahmedabadPhp training in ahmedabad
Php training in ahmedabad
 
Php File Operations
Php File OperationsPhp File Operations
Php File Operations
 
PHP Course in pune , PHP Training in Pimpri chinchwad ,PHP training in Pune
PHP Course in pune , PHP Training in Pimpri chinchwad ,PHP training in PunePHP Course in pune , PHP Training in Pimpri chinchwad ,PHP training in Pune
PHP Course in pune , PHP Training in Pimpri chinchwad ,PHP training in Pune
 
Client side scripting and server side scripting
Client side scripting and server side scriptingClient side scripting and server side scripting
Client side scripting and server side scripting
 
Php basics
Php basicsPhp basics
Php basics
 
Shubham ppt on ospf and framerelay
Shubham ppt on ospf and framerelayShubham ppt on ospf and framerelay
Shubham ppt on ospf and framerelay
 
Php.ppt
Php.pptPhp.ppt
Php.ppt
 
Even internet computers want to be free: Using Linux and open source software...
Even internet computers want to be free: Using Linux and open source software...Even internet computers want to be free: Using Linux and open source software...
Even internet computers want to be free: Using Linux and open source software...
 

Similar to php

Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Muhamad Al Imran
 
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Muhamad Al Imran
 

Similar to php (20)

An Introduction to Websphere sMash for PHP Programmers
An Introduction to Websphere sMash for PHP ProgrammersAn Introduction to Websphere sMash for PHP Programmers
An Introduction to Websphere sMash for PHP Programmers
 
Exploring Symfony's Code
Exploring Symfony's CodeExploring Symfony's Code
Exploring Symfony's Code
 
Php i basic chapter 3
Php i basic chapter 3Php i basic chapter 3
Php i basic chapter 3
 
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
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 (afifah rosli's conflicted copy 2013-04-23)Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
 
Starting with PHP and Web devepolment
Starting with PHP and Web devepolmentStarting with PHP and Web devepolment
Starting with PHP and Web devepolment
 
Basics PHP
Basics PHPBasics PHP
Basics PHP
 
working with PHP & DB's
working with PHP & DB'sworking with PHP & DB's
working with PHP & DB's
 
Php interview questions
Php interview questionsPhp interview questions
Php interview questions
 
Introduction to PHP - Basics of PHP
Introduction to PHP - Basics of PHPIntroduction to PHP - Basics of PHP
Introduction to PHP - Basics of PHP
 
Advanced Php - Macq Electronique 2010
Advanced Php - Macq Electronique 2010Advanced Php - Macq Electronique 2010
Advanced Php - Macq Electronique 2010
 
Unit 1
Unit 1Unit 1
Unit 1
 
Current state-of-php
Current state-of-phpCurrent state-of-php
Current state-of-php
 
PHP Unit-1 Introduction to PHP
PHP Unit-1 Introduction to PHPPHP Unit-1 Introduction to PHP
PHP Unit-1 Introduction to PHP
 
PHP Basics
PHP BasicsPHP Basics
PHP Basics
 
Simplify your professional web development with symfony
Simplify your professional web development with symfonySimplify your professional web development with symfony
Simplify your professional web development with symfony
 
Php
PhpPhp
Php
 
Api Design
Api DesignApi Design
Api Design
 
Php interview questions
Php interview questionsPhp interview questions
Php interview questions
 
Practical catalyst
Practical catalystPractical catalyst
Practical catalyst
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

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