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

Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
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
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
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
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 

Recently uploaded (20)

Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
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...
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
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
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 

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 ?