SlideShare a Scribd company logo
1 of 24
PHP
Made by:Nupoor Garg
M-tech(CSE)

Professional Training Institute
BRIEF HISTORY
PHP FULL FORMS
DEFINITION

PHP is a server side scripting language that is
embedded in HTML. It is used to manage dynamic
content in your website.
WAMP SERVER
"Hello World" Script in
PHP
<HTML>

<HEAD>

<TITLE> First program <TITLE>

<BODY>

<BODY>

</HTML>

HELLO WORLD!

<?php

echo "Hello, World!";

</HEAD>
</BODY
?>
VARIABLES IN PHP
All variables are
declared with leading
dollar($) sign.

$vary=34;
$many=5.34;

Variable can, but do not
need to be declared
before assignment.

PHP does a good job of
automatically converting
types from one to
another when
necessary.

$sum=34;
$sum=“hiii”;
OPERATORS
Arithmetic Operators

Logical (or Relational) Operators

Assignment Operators

Conditional (or ternary) Operators
DATE FUNCTION IN PHP
• date(format)
EXAMPLE:DATE(

);

• Print date with time
EXAMPLE:DATE( “d-m-y h:m:s” );
Time zones
• To set the time zone
date_default_timezone_set();

• To get the time zone
date_default_timezone_get();
ARRAYS IN PHP
• Numeric array
An array with a numeric index. Values are stored and accessed in
linear fashion

• Associative array
An array with strings as index. This stores element values in
association with key values rather than in a strict linear index order.
Example (Numeric arrays)
• <?php
$cars=array("Volvo","BMW","Toyota");
• Echo “I like”.$cars[2];
• ?>
Example (associative array)
•
•
•
•
•
•
•
•
•
•

<html>
<body>
<?php
$salaries['mohammad'] = "high";
$salaries['qadir'] = "medium";
$salaries['zara'] = "low";
echo "Salary of qadir is ". $salaries['qadir']."<br/>";
?>
</body>
</html>
HEADER,INCLUDE AND
REQUIRE
• HEADER
IT IS USED TO REDIRECT TO ANOTHER PAGE.

• INCLUDE
IT IS USED TO INCLUDE THE ANOTHER PAGE INTO THE
CURRENT PAGE.

• REQUIRE
SAME AS INCLUDE.
STEP 1 :- TO ESTABLISH CONNECTION

mysql_connect(host,username,password,databasename);
<? PHP
$LINK=MYSQL_CONNECT(“LOCALHOST”,”ROOT”,””,”myd”);
IF($LINK)
{
ECHO “CONNECTION ESTABLISHED”
}
MYSQL BASIC QUERIES
• TO CREATE DATABASE
CREATE DATABASE DB_NAME;

• TO CREATE TABLE
CREATE TABLE TB_NAME(COL_NM1
DATATYPE,COL_NM2 DATATYPE……);

• TO LIST THE DATA
SELECT * FROM TABLE_NAME;
• TO INSERT VALUES IN TABLE
INSERT INTO TABLE_NAME
VALUES(VALUE1,VALUE2……..VALUEN);
QUERIES TO BE USED
WITH MYSQL
• MYSQLI_CONNECT();
• The mysqli_connect() function opens a
MySQL connection.
• This function returns the connection on
success, or FALSE on failure.
CONT..
• MYSQLI_QUERY($CON,”QUERY”);
• MYSQLI_CLOSE($CON);
• Closes a previously opened database
connection
FETCHING DATA FROM
MYSQL DATABASE
ORDER BY RAND()
FUNCTION IN MYSQL
• MySQL has a ORDER BY RAND()
function that can be used to randomize the
set of values.
• SYNTAX
• SELECT * FROM TABLE_NAME ORDER
BY RAND();
WORDPRESS
WordPress is a free and open source blogging tool and a contentmanagement system based on PHP and MySQL.

WordPress is an OPEN SOURCE project, which means there are
hundreds of people all over the world working on it.

WordPress started as just a blogging system, but has evolved to
be used as full content management system and so much more
through the thousands of plugins and widgets and themes.
WordPress is limited only by your imagination.
Learn Php in Delhi

More Related Content

What's hot

System performance tuning
System performance tuningSystem performance tuning
System performance tuningMenandro Oba
 
Slim RedBeanPHP and Knockout
Slim RedBeanPHP and KnockoutSlim RedBeanPHP and Knockout
Slim RedBeanPHP and KnockoutVic Metcalfe
 
Class 6 - PHP Web Programming
Class 6 - PHP Web ProgrammingClass 6 - PHP Web Programming
Class 6 - PHP Web ProgrammingAhmed Swilam
 
Phpne august-2012-symfony-components-friends
Phpne august-2012-symfony-components-friendsPhpne august-2012-symfony-components-friends
Phpne august-2012-symfony-components-friendsMichael Peacock
 
Redis for your boss 2.0
Redis for your boss 2.0Redis for your boss 2.0
Redis for your boss 2.0Elena Kolevska
 
MySQLi - An Improved Extension of MySQL
MySQLi - An Improved Extension of MySQLMySQLi - An Improved Extension of MySQL
MySQLi - An Improved Extension of MySQLGlobal Codester
 
Inside Bokete: Web Application with Mojolicious and others
Inside Bokete:  Web Application with Mojolicious and othersInside Bokete:  Web Application with Mojolicious and others
Inside Bokete: Web Application with Mojolicious and othersYusuke Wada
 
Intro to php
Intro to phpIntro to php
Intro to phpSp Singh
 
Codeigniter : Custom Routing - Manipulate Uri
Codeigniter : Custom Routing - Manipulate UriCodeigniter : Custom Routing - Manipulate Uri
Codeigniter : Custom Routing - Manipulate UriAbdul Malik Ikhsan
 
New: Two Methods of Installing Drupal on Windows XP with XAMPP
New: Two Methods of Installing Drupal on Windows XP with XAMPPNew: Two Methods of Installing Drupal on Windows XP with XAMPP
New: Two Methods of Installing Drupal on Windows XP with XAMPPRupesh Kumar
 

What's hot (20)

System performance tuning
System performance tuningSystem performance tuning
System performance tuning
 
Php basics
Php basicsPhp basics
Php basics
 
Slim RedBeanPHP and Knockout
Slim RedBeanPHP and KnockoutSlim RedBeanPHP and Knockout
Slim RedBeanPHP and Knockout
 
REST API with CakePHP
REST API with CakePHPREST API with CakePHP
REST API with CakePHP
 
Modern php
Modern phpModern php
Modern php
 
Redis for your boss
Redis for your bossRedis for your boss
Redis for your boss
 
Class 6 - PHP Web Programming
Class 6 - PHP Web ProgrammingClass 6 - PHP Web Programming
Class 6 - PHP Web Programming
 
RESTful web services
RESTful web servicesRESTful web services
RESTful web services
 
Phpne august-2012-symfony-components-friends
Phpne august-2012-symfony-components-friendsPhpne august-2012-symfony-components-friends
Phpne august-2012-symfony-components-friends
 
Redis for your boss 2.0
Redis for your boss 2.0Redis for your boss 2.0
Redis for your boss 2.0
 
MySQLi - An Improved Extension of MySQL
MySQLi - An Improved Extension of MySQLMySQLi - An Improved Extension of MySQL
MySQLi - An Improved Extension of MySQL
 
Php mysql
Php mysqlPhp mysql
Php mysql
 
Mojo as a_client
Mojo as a_clientMojo as a_client
Mojo as a_client
 
Phphacku iitd
Phphacku iitdPhphacku iitd
Phphacku iitd
 
PHP for hacks
PHP for hacksPHP for hacks
PHP for hacks
 
Inside Bokete: Web Application with Mojolicious and others
Inside Bokete:  Web Application with Mojolicious and othersInside Bokete:  Web Application with Mojolicious and others
Inside Bokete: Web Application with Mojolicious and others
 
Intro to php
Intro to phpIntro to php
Intro to php
 
Codeigniter : Custom Routing - Manipulate Uri
Codeigniter : Custom Routing - Manipulate UriCodeigniter : Custom Routing - Manipulate Uri
Codeigniter : Custom Routing - Manipulate Uri
 
Mojolicious
MojoliciousMojolicious
Mojolicious
 
New: Two Methods of Installing Drupal on Windows XP with XAMPP
New: Two Methods of Installing Drupal on Windows XP with XAMPPNew: Two Methods of Installing Drupal on Windows XP with XAMPP
New: Two Methods of Installing Drupal on Windows XP with XAMPP
 

Viewers also liked (6)

2013 14 half-season packet-1
2013 14 half-season packet-12013 14 half-season packet-1
2013 14 half-season packet-1
 
Chalo america
Chalo americaChalo america
Chalo america
 
Vtips matlab course content
Vtips matlab course contentVtips matlab course content
Vtips matlab course content
 
Java Training in New Delhi Lajpat Nagar
Java Training in New Delhi Lajpat NagarJava Training in New Delhi Lajpat Nagar
Java Training in New Delhi Lajpat Nagar
 
Matlab training Introduction at VTIPS
Matlab training Introduction at VTIPSMatlab training Introduction at VTIPS
Matlab training Introduction at VTIPS
 
Sponsorship letter
Sponsorship letterSponsorship letter
Sponsorship letter
 

Similar to Php Training Workshop by Vtips

Similar to Php Training Workshop by Vtips (20)

PHP and MySQL.ppt
PHP and MySQL.pptPHP and MySQL.ppt
PHP and MySQL.ppt
 
PHP from soup to nuts Course Deck
PHP from soup to nuts Course DeckPHP from soup to nuts Course Deck
PHP from soup to nuts Course Deck
 
Php basic for vit university
Php basic for vit universityPhp basic for vit university
Php basic for vit university
 
Php with mysql ppt
Php with mysql pptPhp with mysql ppt
Php with mysql ppt
 
Php summary
Php summaryPhp summary
Php summary
 
Php
PhpPhp
Php
 
Php a dynamic web scripting language
Php   a dynamic web scripting languagePhp   a dynamic web scripting language
Php a dynamic web scripting language
 
Php
PhpPhp
Php
 
HackU PHP and Node.js
HackU PHP and Node.jsHackU PHP and Node.js
HackU PHP and Node.js
 
Php talk
Php talkPhp talk
Php talk
 
Php hacku
Php hackuPhp hacku
Php hacku
 
PHP
PHPPHP
PHP
 
php (Hypertext Preprocessor)
php (Hypertext Preprocessor)php (Hypertext Preprocessor)
php (Hypertext Preprocessor)
 
Starting with PHP and Web devepolment
Starting with PHP and Web devepolmentStarting with PHP and Web devepolment
Starting with PHP and Web devepolment
 
FYBSC IT Web Programming Unit IV PHP and MySQL
FYBSC IT Web Programming Unit IV  PHP and MySQLFYBSC IT Web Programming Unit IV  PHP and MySQL
FYBSC IT Web Programming Unit IV PHP and MySQL
 
Scaling php applications with redis
Scaling php applications with redisScaling php applications with redis
Scaling php applications with redis
 
php 1
php 1php 1
php 1
 
Current state-of-php
Current state-of-phpCurrent state-of-php
Current state-of-php
 
PDO Basics - PHPMelb 2014
PDO Basics - PHPMelb 2014PDO Basics - PHPMelb 2014
PDO Basics - PHPMelb 2014
 
Fatc
FatcFatc
Fatc
 

Recently uploaded

COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 

Recently uploaded (20)

COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 

Php Training Workshop by Vtips

  • 4. DEFINITION PHP is a server side scripting language that is embedded in HTML. It is used to manage dynamic content in your website.
  • 6. "Hello World" Script in PHP <HTML> <HEAD> <TITLE> First program <TITLE> <BODY> <BODY> </HTML> HELLO WORLD! <?php echo "Hello, World!"; </HEAD> </BODY ?>
  • 7. VARIABLES IN PHP All variables are declared with leading dollar($) sign. $vary=34; $many=5.34; Variable can, but do not need to be declared before assignment. PHP does a good job of automatically converting types from one to another when necessary. $sum=34; $sum=“hiii”;
  • 8. OPERATORS Arithmetic Operators Logical (or Relational) Operators Assignment Operators Conditional (or ternary) Operators
  • 9. DATE FUNCTION IN PHP • date(format) EXAMPLE:DATE( ); • Print date with time EXAMPLE:DATE( “d-m-y h:m:s” );
  • 10. Time zones • To set the time zone date_default_timezone_set(); • To get the time zone date_default_timezone_get();
  • 11. ARRAYS IN PHP • Numeric array An array with a numeric index. Values are stored and accessed in linear fashion • Associative array An array with strings as index. This stores element values in association with key values rather than in a strict linear index order.
  • 12. Example (Numeric arrays) • <?php $cars=array("Volvo","BMW","Toyota"); • Echo “I like”.$cars[2]; • ?>
  • 13. Example (associative array) • • • • • • • • • • <html> <body> <?php $salaries['mohammad'] = "high"; $salaries['qadir'] = "medium"; $salaries['zara'] = "low"; echo "Salary of qadir is ". $salaries['qadir']."<br/>"; ?> </body> </html>
  • 14. HEADER,INCLUDE AND REQUIRE • HEADER IT IS USED TO REDIRECT TO ANOTHER PAGE. • INCLUDE IT IS USED TO INCLUDE THE ANOTHER PAGE INTO THE CURRENT PAGE. • REQUIRE SAME AS INCLUDE.
  • 15.
  • 16. STEP 1 :- TO ESTABLISH CONNECTION mysql_connect(host,username,password,databasename); <? PHP $LINK=MYSQL_CONNECT(“LOCALHOST”,”ROOT”,””,”myd”); IF($LINK) { ECHO “CONNECTION ESTABLISHED” }
  • 17. MYSQL BASIC QUERIES • TO CREATE DATABASE CREATE DATABASE DB_NAME; • TO CREATE TABLE CREATE TABLE TB_NAME(COL_NM1 DATATYPE,COL_NM2 DATATYPE……); • TO LIST THE DATA SELECT * FROM TABLE_NAME;
  • 18. • TO INSERT VALUES IN TABLE INSERT INTO TABLE_NAME VALUES(VALUE1,VALUE2……..VALUEN);
  • 19. QUERIES TO BE USED WITH MYSQL • MYSQLI_CONNECT(); • The mysqli_connect() function opens a MySQL connection. • This function returns the connection on success, or FALSE on failure.
  • 20. CONT.. • MYSQLI_QUERY($CON,”QUERY”); • MYSQLI_CLOSE($CON); • Closes a previously opened database connection
  • 22. ORDER BY RAND() FUNCTION IN MYSQL • MySQL has a ORDER BY RAND() function that can be used to randomize the set of values. • SYNTAX • SELECT * FROM TABLE_NAME ORDER BY RAND();
  • 23. WORDPRESS WordPress is a free and open source blogging tool and a contentmanagement system based on PHP and MySQL. WordPress is an OPEN SOURCE project, which means there are hundreds of people all over the world working on it. WordPress started as just a blogging system, but has evolved to be used as full content management system and so much more through the thousands of plugins and widgets and themes. WordPress is limited only by your imagination.
  • 24. Learn Php in Delhi