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 (20)

PHP Presentation
PHP PresentationPHP Presentation
PHP Presentation
 
PHP - Introduction to PHP Fundamentals
PHP -  Introduction to PHP FundamentalsPHP -  Introduction to PHP Fundamentals
PHP - Introduction to PHP Fundamentals
 
PHP variables
PHP  variablesPHP  variables
PHP variables
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
4.2 PHP Function
4.2 PHP Function4.2 PHP Function
4.2 PHP Function
 
Php Tutorials for Beginners
Php Tutorials for BeginnersPhp Tutorials for Beginners
Php Tutorials for Beginners
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
JavaScript - Chapter 12 - Document Object Model
  JavaScript - Chapter 12 - Document Object Model  JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 12 - Document Object Model
 
Php basics
Php basicsPhp basics
Php basics
 
PHP slides
PHP slidesPHP slides
PHP slides
 
Php
PhpPhp
Php
 
PHP Workshop Notes
PHP Workshop NotesPHP Workshop Notes
PHP Workshop Notes
 
Php with MYSQL Database
Php with MYSQL DatabasePhp with MYSQL Database
Php with MYSQL Database
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Model
 
Php array
Php arrayPhp array
Php array
 
Introduction to xampp
Introduction to xamppIntroduction to xampp
Introduction to xampp
 
PHP - Introduction to File Handling with PHP
PHP -  Introduction to  File Handling with PHPPHP -  Introduction to  File Handling with PHP
PHP - Introduction to File Handling with PHP
 
CSS
CSSCSS
CSS
 
PHP Cookies and Sessions
PHP Cookies and SessionsPHP Cookies and Sessions
PHP Cookies and Sessions
 
Php mysql
Php mysqlPhp mysql
Php mysql
 

Viewers also liked

Php hypertext pre-processor
Php   hypertext pre-processorPhp   hypertext pre-processor
Php hypertext pre-processorSiddique Ibrahim
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHPBradley Holt
 
Linux Introduction (Commands)
Linux Introduction (Commands)Linux Introduction (Commands)
Linux Introduction (Commands)anandvaidya
 
Php file handling in Hindi
Php file handling in Hindi Php file handling in Hindi
Php file handling in Hindi Vipin sharma
 
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)jeresig
 
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 PuneCNC WEB WORLD
 
Shubham ppt on ospf and framerelay
Shubham ppt on ospf and framerelayShubham ppt on ospf and framerelay
Shubham ppt on ospf and framerelayshubham katiyar
 
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...North Bend Public Library
 

Viewers also liked (20)

Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
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
 
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

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 Programmersjphl
 
Exploring Symfony's Code
Exploring Symfony's CodeExploring Symfony's Code
Exploring Symfony's CodeWildan Maulana
 
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
 
Starting with PHP and Web devepolment
Starting with PHP and Web devepolmentStarting with PHP and Web devepolment
Starting with PHP and Web devepolmentRajib Ahmed
 
Php interview questions
Php interview questionsPhp interview questions
Php interview questionssekar c
 
Introduction to PHP - Basics of PHP
Introduction to PHP - Basics of PHPIntroduction to PHP - Basics of PHP
Introduction to PHP - Basics of PHPwahidullah mudaser
 
Advanced Php - Macq Electronique 2010
Advanced Php - Macq Electronique 2010Advanced Php - Macq Electronique 2010
Advanced Php - Macq Electronique 2010Michelangelo van Dam
 
PHP Unit-1 Introduction to PHP
PHP Unit-1 Introduction to PHPPHP Unit-1 Introduction to PHP
PHP Unit-1 Introduction to PHPLariya Minhaz
 
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 symfonyFrancois Zaninotto
 
Php interview questions
Php interview questionsPhp interview questions
Php interview questionssubash01
 
Practical catalyst
Practical catalystPractical catalyst
Practical catalystdwm042
 

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

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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...Drew Madelung
 
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...apidays
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
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 WorkerThousandEyes
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
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 DevelopmentsTrustArc
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 

Recently uploaded (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
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 - 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...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 

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