SlideShare a Scribd company logo
1 of 13
Download to read offline
HTML , PHP , MYSQL

              J.JAGAN., M.C.A
    KANCHI LINUX USER GROUP
HTML
<html>             <html>
<head> </head>     <head>LINUX</head>
<body> </body>     <body>we are in
</html>
 meeting</body>
                   </html>
Note:
Save by extention “file_name.html”
HTML
<html>
<body><form name=“a” action=“detail.php”
  method=post>
NO:<input type=“text” name=“no” size=“10”>
SEX:
Male<input type=“radio” name=“sex”
  value=“male”>
Female<input type=“radio” name=“sex”
  value=“female”>
DEPARTMENT : <select name=“dept”>
           <option>MBA</option>
           <option>MCA</option>
           </select>
</form> </body>
</html>
ATTRIBUTES
<br>                         = give break
<a href=“path”>link_name</a> = for link
<table> </table>             = create table
<tr> </tr>                   = insert table
                                 row
<td> </td>                   = table
                                 definition
<h1,2,3,4></h1,2,3,4>       = predefined
                                  font
<img src=“path”>            = insert image
Php_manual.ico
                  FIRST CODE
<? php                <html>
echo “This is PHP”;       <body>
echo “<br>” ;             <?php
?>                     echo “This is PHP”;

                           echo “<br>”;
                      ?>
                      </body>
                      </html>
php
<?php                   <?php
$ variable_name;        $a=10;
echo “variable_name”;   echo“$a”;
?>                      ?>
php
Loop:                  if:
<?php                        <?php
for($a=1;$a<=5;$a++)         $a=20;
 {                           $b=10;
   echo “$a”;                if($a>$b)
  }                          {
?>                           echo “A is greater”;
                             }
                             else
                             {
                             echo “B is  greater;
                             }
                             ?>php
Form with php
<html>
<body><form name=“a” action=“detail.php”
  method=post>
NO:<input type=“text” name=“no”
  size=“10”>
SEX:
Male<input type=“radio” name=“sex”
  value=“male”>
Female<input type=“radio” name=“sex”
  value=“female”>
DEPARTMENT : <select name=“dept”>
           <option>MBA</option>
           <option>MCA</option>
           </select>
</form> </body></html>
detail.php
<?php
$no=$_POST[‘no’];
$sex=$_POST[‘sex’];
$dept=$_POST[‘dept’];
echo “$no”;
echo “<br>”;
echo “$sex”;
echo “<br>”;
echo “$dept”;
?>
mysql for insert
<?php
$conn = mysql_connect('localhost', 'root', '')
  or die('Could not connect: ' . mysql_error());
echo ("Connected successfully");
echo ( "<BR>");
$rs=mysql_select_db(“stud",$conn)
     or die('cannot access');
$sql=("insert into info values
  ('$_POST[no]','$_POST[sex]','$_POST[dept]‘ )”);

$rs=mysql_query($sql,$conn) or die(“not
  connected");

echo("<br>");
echo("DATA IS INSERTED");
?>
For view
<?php
$link = mysql_connect('localhost',
  'root', '') or die('Could not connect:
  ' . mysql_error());
echo 'Connected successfully'."<BR>";

mysql_select_db(“stud”,$link) or
 die('cannot access');
$sql="select *from info";
echo "<table table color=red border='10'
  bordercolor=green >
<tr bgcolor=cyan>
<TH>NO</TH>
<TH>SEX</TH>
<TH>DEPT</TH>
</tr>";
while(($row=mysql_fetch_array($rs)))
{
echo("<tr>");
echo("<td>" . $row[“no"]. "</td>");
echo("<td>" . $row[“sex"] . "</td>");
echo("<td>" . $row[“dept"]."</td>");
echo("</tr>");
}
echo("</table>");
THANK YOU
WILL SEE ON NEXT
     SUNDAY

  ANY QUIRES ?

More Related Content

What's hot (18)

Php mysql
Php mysqlPhp mysql
Php mysql
 
Php talk
Php talkPhp talk
Php talk
 
Using PHP
Using PHPUsing PHP
Using PHP
 
RESTful web services
RESTful web servicesRESTful web services
RESTful web services
 
Blog Hacks 2011
Blog Hacks 2011Blog Hacks 2011
Blog Hacks 2011
 
16.mysql stored procedures in laravel
16.mysql stored procedures in laravel16.mysql stored procedures in laravel
16.mysql stored procedures in laravel
 
Session8
Session8Session8
Session8
 
Php Tutorial | Introduction Demo | Basics
 Php Tutorial | Introduction Demo | Basics Php Tutorial | Introduction Demo | Basics
Php Tutorial | Introduction Demo | Basics
 
Php101
Php101Php101
Php101
 
Using Geeklog as a Web Application Framework
Using Geeklog as a Web Application FrameworkUsing Geeklog as a Web Application Framework
Using Geeklog as a Web Application Framework
 
Ben Bridts - $ aws help
Ben Bridts -  $ aws helpBen Bridts -  $ aws help
Ben Bridts - $ aws help
 
Php hacku
Php hackuPhp hacku
Php hacku
 
PHP Lecture 4 - Working with form, GET and Post Methods
PHP Lecture 4 - Working with form, GET and Post MethodsPHP Lecture 4 - Working with form, GET and Post Methods
PHP Lecture 4 - Working with form, GET and Post Methods
 
Session3
Session3Session3
Session3
 
Micropage in microtime using microframework
Micropage in microtime using microframeworkMicropage in microtime using microframework
Micropage in microtime using microframework
 
wget.pl
wget.plwget.pl
wget.pl
 
Database Management - Lecture 4 - PHP and Mysql
Database Management - Lecture 4 - PHP and MysqlDatabase Management - Lecture 4 - PHP and Mysql
Database Management - Lecture 4 - PHP and Mysql
 
SULTHAN's - PHP MySQL programs
SULTHAN's - PHP MySQL programsSULTHAN's - PHP MySQL programs
SULTHAN's - PHP MySQL programs
 

Viewers also liked

Viewers also liked (10)

MySQL資料庫設計規劃與phpMyAdmin
MySQL資料庫設計規劃與phpMyAdminMySQL資料庫設計規劃與phpMyAdmin
MySQL資料庫設計規劃與phpMyAdmin
 
開始網站設計
開始網站設計開始網站設計
開始網站設計
 
AI Chatbot Service Framework based on Backpropagation Network for Predicting ...
AI Chatbot Service Framework based on Backpropagation Network for Predicting ...AI Chatbot Service Framework based on Backpropagation Network for Predicting ...
AI Chatbot Service Framework based on Backpropagation Network for Predicting ...
 
Introduction to php web programming - get and post
Introduction to php  web programming - get and postIntroduction to php  web programming - get and post
Introduction to php web programming - get and post
 
Introduction to php web programming - sessions and cookies
Introduction to php   web programming - sessions and cookiesIntroduction to php   web programming - sessions and cookies
Introduction to php web programming - sessions and cookies
 
MySQL
MySQLMySQL
MySQL
 
Class 6 - PHP Web Programming
Class 6 - PHP Web ProgrammingClass 6 - PHP Web Programming
Class 6 - PHP Web Programming
 
MySql slides (ppt)
MySql slides (ppt)MySql slides (ppt)
MySql slides (ppt)
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Php mysql ppt
Php mysql pptPhp mysql ppt
Php mysql ppt
 

Similar to PHP an intro -1

Similar to PHP an intro -1 (20)

PHP POWERPOINT SLIDES
PHP POWERPOINT SLIDESPHP POWERPOINT SLIDES
PHP POWERPOINT SLIDES
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Mike King - Storytelling by Numbers MKTFEST 2014
Mike King - Storytelling by Numbers MKTFEST 2014Mike King - Storytelling by Numbers MKTFEST 2014
Mike King - Storytelling by Numbers MKTFEST 2014
 
Storytelling By Numbers
Storytelling By NumbersStorytelling By Numbers
Storytelling By Numbers
 
Tutorial_4_PHP
Tutorial_4_PHPTutorial_4_PHP
Tutorial_4_PHP
 
Tutorial_4_PHP
Tutorial_4_PHPTutorial_4_PHP
Tutorial_4_PHP
 
Tutorial_4_PHP
Tutorial_4_PHPTutorial_4_PHP
Tutorial_4_PHP
 
Tutorial_4_PHP
Tutorial_4_PHPTutorial_4_PHP
Tutorial_4_PHP
 
GettingStartedWithPHP
GettingStartedWithPHPGettingStartedWithPHP
GettingStartedWithPHP
 
Grok Drupal (7) Theming
Grok Drupal (7) ThemingGrok Drupal (7) Theming
Grok Drupal (7) Theming
 
PHP Tutorial (funtion)
PHP Tutorial (funtion)PHP Tutorial (funtion)
PHP Tutorial (funtion)
 
Web 8 | Introduction to PHP
Web 8 | Introduction to PHPWeb 8 | Introduction to PHP
Web 8 | Introduction to PHP
 
Php
PhpPhp
Php
 
Php (1)
Php (1)Php (1)
Php (1)
 
Ip lab
Ip labIp lab
Ip lab
 
Ex[1].3 php db connectivity
Ex[1].3 php db connectivityEx[1].3 php db connectivity
Ex[1].3 php db connectivity
 
4. Php MongoDB view_data
4. Php MongoDB view_data4. Php MongoDB view_data
4. Php MongoDB view_data
 
Quick beginner to Lower-Advanced guide/tutorial in PHP
Quick beginner to Lower-Advanced guide/tutorial in PHPQuick beginner to Lower-Advanced guide/tutorial in PHP
Quick beginner to Lower-Advanced guide/tutorial in PHP
 
Intro to php
Intro to phpIntro to php
Intro to php
 
Php
PhpPhp
Php
 

More from Kanchilug

Kanchilug Boot camp
Kanchilug Boot campKanchilug Boot camp
Kanchilug Boot campKanchilug
 
Gnu/Linux calendar 2010 final
Gnu/Linux calendar 2010 finalGnu/Linux calendar 2010 final
Gnu/Linux calendar 2010 finalKanchilug
 
Gnu/Linux Calendar 2010 V -1.0
Gnu/Linux Calendar 2010 V -1.0Gnu/Linux Calendar 2010 V -1.0
Gnu/Linux Calendar 2010 V -1.0Kanchilug
 
ubuntu 9.10 release party @ kanchilug
ubuntu 9.10 release party @ kanchilugubuntu 9.10 release party @ kanchilug
ubuntu 9.10 release party @ kanchilugKanchilug
 
Python quick guide1
Python quick guide1Python quick guide1
Python quick guide1Kanchilug
 
Linux Commands - 3
Linux Commands - 3Linux Commands - 3
Linux Commands - 3Kanchilug
 
SFD '09 Article in Tamil
SFD '09 Article in TamilSFD '09 Article in Tamil
SFD '09 Article in TamilKanchilug
 
More Depth Commands In Linux - By Vishnu
More Depth Commands In Linux - By VishnuMore Depth Commands In Linux - By Vishnu
More Depth Commands In Linux - By VishnuKanchilug
 
OpenOffice-SpreadSheet
OpenOffice-SpreadSheetOpenOffice-SpreadSheet
OpenOffice-SpreadSheetKanchilug
 
Sub Version Intro
Sub Version IntroSub Version Intro
Sub Version IntroKanchilug
 
open source intro
open source introopen source intro
open source introKanchilug
 
How to Install Ubuntu as Dual
How to  Install Ubuntu as DualHow to  Install Ubuntu as Dual
How to Install Ubuntu as DualKanchilug
 
Kanchi Lug Pam-let
Kanchi Lug Pam-letKanchi Lug Pam-let
Kanchi Lug Pam-letKanchilug
 
An Intro To Television
An Intro To Television An Intro To Television
An Intro To Television Kanchilug
 
How To Use Open Office WordProcessor
How To Use Open Office WordProcessorHow To Use Open Office WordProcessor
How To Use Open Office WordProcessorKanchilug
 
Basic Commands 1 By Thanigai
Basic Commands  1 By ThanigaiBasic Commands  1 By Thanigai
Basic Commands 1 By ThanigaiKanchilug
 

More from Kanchilug (20)

Perl intro
Perl introPerl intro
Perl intro
 
Ltsp talk
Ltsp talkLtsp talk
Ltsp talk
 
Kanchilug Boot camp
Kanchilug Boot campKanchilug Boot camp
Kanchilug Boot camp
 
Cloud Compt
Cloud ComptCloud Compt
Cloud Compt
 
Perl Basics
Perl BasicsPerl Basics
Perl Basics
 
Gnu/Linux calendar 2010 final
Gnu/Linux calendar 2010 finalGnu/Linux calendar 2010 final
Gnu/Linux calendar 2010 final
 
Gnu/Linux Calendar 2010 V -1.0
Gnu/Linux Calendar 2010 V -1.0Gnu/Linux Calendar 2010 V -1.0
Gnu/Linux Calendar 2010 V -1.0
 
ubuntu 9.10 release party @ kanchilug
ubuntu 9.10 release party @ kanchilugubuntu 9.10 release party @ kanchilug
ubuntu 9.10 release party @ kanchilug
 
Python quick guide1
Python quick guide1Python quick guide1
Python quick guide1
 
Linux Commands - 3
Linux Commands - 3Linux Commands - 3
Linux Commands - 3
 
SFD '09 Article in Tamil
SFD '09 Article in TamilSFD '09 Article in Tamil
SFD '09 Article in Tamil
 
More Depth Commands In Linux - By Vishnu
More Depth Commands In Linux - By VishnuMore Depth Commands In Linux - By Vishnu
More Depth Commands In Linux - By Vishnu
 
OpenOffice-SpreadSheet
OpenOffice-SpreadSheetOpenOffice-SpreadSheet
OpenOffice-SpreadSheet
 
Sub Version Intro
Sub Version IntroSub Version Intro
Sub Version Intro
 
open source intro
open source introopen source intro
open source intro
 
How to Install Ubuntu as Dual
How to  Install Ubuntu as DualHow to  Install Ubuntu as Dual
How to Install Ubuntu as Dual
 
Kanchi Lug Pam-let
Kanchi Lug Pam-letKanchi Lug Pam-let
Kanchi Lug Pam-let
 
An Intro To Television
An Intro To Television An Intro To Television
An Intro To Television
 
How To Use Open Office WordProcessor
How To Use Open Office WordProcessorHow To Use Open Office WordProcessor
How To Use Open Office WordProcessor
 
Basic Commands 1 By Thanigai
Basic Commands  1 By ThanigaiBasic Commands  1 By Thanigai
Basic Commands 1 By Thanigai
 

Recently uploaded

SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 

Recently uploaded (20)

SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 

PHP an intro -1

  • 1. HTML , PHP , MYSQL J.JAGAN., M.C.A KANCHI LINUX USER GROUP
  • 2. HTML <html> <html> <head> </head> <head>LINUX</head> <body> </body> <body>we are in </html> meeting</body> </html> Note: Save by extention “file_name.html”
  • 3. HTML <html> <body><form name=“a” action=“detail.php” method=post> NO:<input type=“text” name=“no” size=“10”> SEX: Male<input type=“radio” name=“sex” value=“male”> Female<input type=“radio” name=“sex” value=“female”> DEPARTMENT : <select name=“dept”> <option>MBA</option> <option>MCA</option> </select> </form> </body> </html>
  • 4. ATTRIBUTES <br> = give break <a href=“path”>link_name</a> = for link <table> </table> = create table <tr> </tr> = insert table row <td> </td> = table definition <h1,2,3,4></h1,2,3,4> = predefined font <img src=“path”> = insert image
  • 5. Php_manual.ico FIRST CODE <? php <html> echo “This is PHP”; <body> echo “<br>” ; <?php ?> echo “This is PHP”; echo “<br>”; ?> </body> </html>
  • 6. php <?php <?php $ variable_name; $a=10; echo “variable_name”; echo“$a”; ?> ?>
  • 7. php Loop: if: <?php <?php for($a=1;$a<=5;$a++) $a=20; { $b=10; echo “$a”; if($a>$b) } { ?> echo “A is greater”; } else { echo “B is greater; } ?>php
  • 8. Form with php <html> <body><form name=“a” action=“detail.php” method=post> NO:<input type=“text” name=“no” size=“10”> SEX: Male<input type=“radio” name=“sex” value=“male”> Female<input type=“radio” name=“sex” value=“female”> DEPARTMENT : <select name=“dept”> <option>MBA</option> <option>MCA</option> </select> </form> </body></html>
  • 10. mysql for insert <?php $conn = mysql_connect('localhost', 'root', '') or die('Could not connect: ' . mysql_error()); echo ("Connected successfully"); echo ( "<BR>"); $rs=mysql_select_db(“stud",$conn) or die('cannot access'); $sql=("insert into info values ('$_POST[no]','$_POST[sex]','$_POST[dept]‘ )”); $rs=mysql_query($sql,$conn) or die(“not connected"); echo("<br>"); echo("DATA IS INSERTED"); ?>
  • 11. For view <?php $link = mysql_connect('localhost', 'root', '') or die('Could not connect: ' . mysql_error()); echo 'Connected successfully'."<BR>"; mysql_select_db(“stud”,$link) or die('cannot access'); $sql="select *from info";
  • 12. echo "<table table color=red border='10' bordercolor=green > <tr bgcolor=cyan> <TH>NO</TH> <TH>SEX</TH> <TH>DEPT</TH> </tr>"; while(($row=mysql_fetch_array($rs))) { echo("<tr>"); echo("<td>" . $row[“no"]. "</td>"); echo("<td>" . $row[“sex"] . "</td>"); echo("<td>" . $row[“dept"]."</td>"); echo("</tr>"); } echo("</table>");
  • 13. THANK YOU WILL SEE ON NEXT SUNDAY ANY QUIRES ?