SlideShare a Scribd company logo
1 of 17
Web Database Applications
PHP and MYSQL Database Web Application
By
Sunny Okoro
Contents
Introduction ..................................................................................................................................................2
Development Tools.......................................................................................................................................2
Student Application System..........................................................................................................................3
Student Application System Codes...............................................................................................................7
Student Application System 2.....................................................................................................................10
Student Application System 2 Code............................................................................................................11
Student Application System 3.....................................................................................................................13
Student Application System Code 3............................................................................................................14
Introduction
This documents contains few web applications written in PHP and HTML scripting language
that would allow a user to interact with a MySQL database
Development Tools
Database Platform: MySQL
Web Scripting Languages: PHP and HTML
Web Server: EASY PHP 5.3.8.1 with Apache
Student Application System
Now insert some records into the database by completing the required information.
Verify that the information has been inserted into the database to their corresponding table. Student is
the database and school is the table. To accomplish this task, a query is needed.
Student Application System Codes
<?php
/*****************************************************
This display array POST
*****************************************************/
//echo "<pre>";
//print_r($_POST);
//echo "</pre>";
/*****************************************************
Create variables with information from array POST
*****************************************************/
$FirstName = $_POST["FirstName"];
$LastName = $_POST["LastName"];
$Email=$_POST["Email"];
$Gender =$_POST ["Gender"];
$Password=$_POST["Password"];
$ConfirmPassword=$_POST ["ConfirmPassword"];
$StudentYear=$_POST["StudentYear"];
$Interest=$_POST["Interest"];
$picture = $_POST["picture"];
$profile = $_POST["profile"];
$Sports = $_POST["Sports"];
/*************************************
connect to mysql
********************************************/
$server = "Localhost"; // Server name
$user = "root"; // User name
$pass = "" ; // password
$connect = mysql_connect($server, $user, $pass)
or die ("Error: Bad connection" );
$sel = mysql_select_db('school') or die("Error: Bad connection");
$sql = "INSERT INTO Student (FirstName, LastName, Email, Gender, Password,
ConfirmPassword, StudentYear, Interest, picture, profile, Sports)";
$sql .= "VALUES ("$FirstName", "$LastName", "$Email",
"$Gender","$Password", "$ConfirmPassword", "$StudentYear",
"$Interest", "$picture","$profile", "$Sports" )";
$query = mysql_query($sql);
$numRows = mysql_affected_rows($connect);
if ($numRows == 1)
echo
"<h1> New student added</h1>";
mysql_close($connect);
?>
<HTML>
<html>
<body>
<form method= "post" action="student.php">
<h1> New Student </H1>
<table allign ="center" border="1" bgcolor="green">
<tr>
<td align = "right"> FIRST NAME: </td>
<td><input type="text" name="FirstName"></td>
</tr>
<tr>
<td align = "right"> LAST NAME: </td>
<td><input type="text" name="LastName"></td>
</tr>
<tr>
<td align = "right"> Email: </td>
<td><input type= "text" name="Email"></td>
</tr>
<tr>
<td align = "right"> Gender: </td>
<td>
<input type="radio" name="Gender" value="Male">Male <br>
<input type="radio" name="Gender" value="Female">Female </td>
</tr>
<tr>
<td align = "right"> Password: </td>
<td><input type= "password" name= "Password"></td>
</tr>
<tr>
<td align = "right"> ConfirmPassword: </td>
<td><input type= "password" name= "ConfirmPassword"></td>
</tr>
<tr>
<td align = "right"> Student Year:</td>
<td>
<select name = "StudentYear">
<option >Freshman </option>
<option>Sophmore </option>
<option>Junior </option>
<option>Senior</option>
<br>
</select></td>
</tr>
<tr>
<td align = "right"> Interest:</td>
<td><textarea name= "Interest"></textarea></td>
</tr>
<tr>
<td align = "right"> Options:</td>
<td><input type="checkbox" name="picture" value = "Share profile "/>Share my profile
<input type="checkbox" name="profile" value = "Show picture"/>Share my picture
</td>
</tr>
<tr>
<td align = "right"> Sports:</td>
<td><select name= "Sports">
<option>Football</option>
<option>Baseball</option>
<option>Basketball</option>
<option>Volleyball</option>
<option>Tennis</option>
</select>
</td>
</tr>
</table>
<button type ="submit" value ="Submit" name= "Submit"> Submit
<img src="http://farm3.static.flickr.com/2038/1830883816_7e6444f018.jpg" width= "50" height="50">
</button>
<button type ="Reset" value ="Reset" name= "Reset" > Reset
<img src="http://www.houstonexpress.net/images/houston2.jpg" width= "50" height="50"><br />
</button>
</form>
</body
</html>
<Database>
Drop database if exists school;
Create database if not exists school;
Use school;
CREATE TABLE student(
StudentID int NOT NULL AUTO_INCREMENT,
FirstName char(20) NOT NULL,
LastName char(20) NOT NULL,
Email varchar(30) NOT NULL,
Gender char(6) NOT NULL,
Password Varchar(20) NOT NULL,
ConfirmPassword Varchar(20) NOT NULL,
StudentYear char(11) NOT NULL,
Interest Text NOT NULL,
Picture char (20) NOT NULL,
Profile char(20) NOT NULL,
Sports char(42) NOT NULL,
PRIMARY KEY(StudentID)
);
Student Application System 2
Instead of having the user login in to the database to access the data, the user can open a web
application which displays the content of the database back to them for security reasons.
Student Application System 2 Code
<?php
//echo "<pre>";
//print_r($_POST);
//echo "</pre>";
/**********************************************
connect to mysql
********************************************/
$server = "Localhost"; // Server name
$user = "root"; // User name
$pass = "" ; // password
/********************************************
Display message if connection falied
**********************************************/
$connect = mysql_connect($server, $user, $pass)
or die ("Error: Bad connection" );
$select = mysql_select_db("school");
if(!$select)
exit("Error: Could not select database!");
$sql = "SELECT * FROM student";
$query = mysql_query($sql);
if (mysql_num_rows($query) == 0)
{
echo "No records found";
}
else
{
echo "<table align=center border = 1>";
echo"<tr>";
echo "<td><b>StudentID</td>";
echo "<td><b>FirstName</td>";
echo "<td><b>LastName</td>";
echo "<td><b>Email</td>";
echo "<td><b>Gender</td>";
echo "<td><b>Password</td>";
echo "<td><b>ConfirmPassword<td>";
echo "<td><b>StudentYear<b></td>";
echo "<td><b>Interest</td>";
echo "<td><b>profile</td>";
echo "<td><b>picture</td>";
echo "<td><b>Sports</td>";
echo"</tr>";
while($row = mysql_fetch_object($query))
{
echo"<tr>";
echo "<td>".$row->StudentID."</td>";
echo "<td>".$row->FirstName."</td>";
echo "<td>".$row->LastName."</td>";
echo "<td>".$row->Email."</td>";
echo "<td>".$row->Gender."</td>";
echo "<td>".$row->Password."</td>";
echo "<td>".$row->ConfirmPassword."<td>";
echo "<td>".$row->StudentYear."</td>";
echo "<td>".$row->Interest."</td>";
echo "<td>".$row->Profile."</td>";
echo "<td>".$row->Picture."</td>";
echo "<td>".$row->Sports."</td>";
}
echo"</tr>";
}
echo"</table>";
mysql_close($connect);
?>
Student Application System 3
The user can use the student identification number to specify the student they want their data to
displayed back instead of using the general query of select * from student by using a web application.
Student Application System Code3
<student.html>
<html>
<title> STUDENT DATA </title>
<head><h1>STUDENT DATA </h1></head>
<body>
<form method= "post" action="table2.php">
Student ID<input type = "text" name ="STUDENTID">
</input>
<p>
<button type ="submit" value ="Submit" name= "Submit"> Submit
</button>
<button type ="Reset" value ="Reset" name= "Reset" > Reset
</button>
<table2.php file>
<?php
//echo "<pre>";
//print_r($_POST);
//echo "</pre>";
/**********************************************
connect to mysql
********************************************/
$server = "Localhost"; // Server name
$user = "root"; // User name
$pass = "" ; // password
/********************************************
Display message if connection falied
**********************************************/
$connect = mysql_connect($server, $user, $pass)
or die ("Error: Bad connection" );
$select = mysql_select_db("school");
if(!$select)
exit("Error: Could not select database!");
$sql = "SELECT * FROM student WHERE STUDENTID = STUDENTID";
$query = mysql_query($sql);
if (mysql_num_rows($query) == 0)
{
echo "No records found";
}
else
{
echo "<table align=center border = 1>";
echo"<tr>";
echo "<td><b>StudentID</td>";
echo "<td><b>FirstName</td>";
echo "<td><b>LastName</td>";
echo "<td><b>Email</td>";
echo "<td><b>Gender</td>";
echo "<td><b>Password</td>";
echo "<td><b>ConfirmPassword<td>";
echo "<td><b>StudentYear<b></td>";
echo "<td><b>Interest</td>";
echo "<td><b>profile</td>";
echo "<td><b>picture</td>";
echo "<td><b>Sports</td>";
echo"</tr>";
while($row = mysql_fetch_object($query))
{
echo"<tr>";
echo "<td>".$row->StudentID."</td>";
echo "<td>".$row->FirstName."</td>";
echo "<td>".$row->LastName."</td>";
echo "<td>".$row->Email."</td>";
echo "<td>".$row->Gender."</td>";
echo "<td>".$row->Password."</td>";
echo "<td>".$row->ConfirmPassword."<td>";
echo "<td>".$row->StudentYear."</td>";
echo "<td>".$row->Interest."</td>";
echo "<td>".$row->Profile."</td>";
echo "<td>".$row->Picture."</td>";
echo "<td>".$row->Sports."</td>";
}
echo"</tr>";
}
echo"</table>";
mysql_close($connect);
?>

More Related Content

Viewers also liked

Contoh KPI Individu. Rapor Prestasi Kerja
Contoh KPI Individu. Rapor Prestasi KerjaContoh KPI Individu. Rapor Prestasi Kerja
Contoh KPI Individu. Rapor Prestasi KerjaBusinessBuddy Int
 
Tutorial Pembuatan Aplikasi Website Beserta Databasenya
Tutorial Pembuatan Aplikasi Website Beserta DatabasenyaTutorial Pembuatan Aplikasi Website Beserta Databasenya
Tutorial Pembuatan Aplikasi Website Beserta DatabasenyaRCH_98
 
Музыка перевода. Избранные работы за 2010 г.
Музыка перевода. Избранные работы за 2010 г.Музыка перевода. Избранные работы за 2010 г.
Музыка перевода. Избранные работы за 2010 г.Вениамин Бакалинский
 
Nominaconceptos2011
Nominaconceptos2011Nominaconceptos2011
Nominaconceptos2011kode99
 
Теплица Омега
Теплица ОмегаТеплица Омега
Теплица ОмегаAl Maks
 
Woodstock School Religious Life Policy
Woodstock School Religious Life PolicyWoodstock School Religious Life Policy
Woodstock School Religious Life PolicyWoodstock School
 
Communication Catalysts: Changing the World by Doing Our Jobs
Communication Catalysts: Changing the World by Doing Our JobsCommunication Catalysts: Changing the World by Doing Our Jobs
Communication Catalysts: Changing the World by Doing Our JobsKatherine Brown-Hoekstra
 
Steve Dean: Washing My Eyelids
Steve Dean: Washing My EyelidsSteve Dean: Washing My Eyelids
Steve Dean: Washing My EyelidsErnesto Ramirez
 
Maximilian Gotzler: A Testosterone and Diet Experiment
Maximilian Gotzler: A Testosterone and Diet ExperimentMaximilian Gotzler: A Testosterone and Diet Experiment
Maximilian Gotzler: A Testosterone and Diet ExperimentErnesto Ramirez
 
Massif by Steve Matteson
Massif by Steve MattesonMassif by Steve Matteson
Massif by Steve MattesonMonotype
 
Энергофлекс Супер
Энергофлекс СуперЭнергофлекс Супер
Энергофлекс СуперAl Maks
 
Rediscover Pompei - numbered edition Pen
Rediscover Pompei - numbered edition PenRediscover Pompei - numbered edition Pen
Rediscover Pompei - numbered edition Pensamatrone
 
1 check your_english_vocabulary_for_law
1 check your_english_vocabulary_for_law1 check your_english_vocabulary_for_law
1 check your_english_vocabulary_for_lawMira Karanov
 

Viewers also liked (20)

Contoh/Template JOB DESC dalam Perusahaan
Contoh/Template JOB DESC dalam PerusahaanContoh/Template JOB DESC dalam Perusahaan
Contoh/Template JOB DESC dalam Perusahaan
 
Contoh KPI Individu. Rapor Prestasi Kerja
Contoh KPI Individu. Rapor Prestasi KerjaContoh KPI Individu. Rapor Prestasi Kerja
Contoh KPI Individu. Rapor Prestasi Kerja
 
Tutorial Pembuatan Aplikasi Website Beserta Databasenya
Tutorial Pembuatan Aplikasi Website Beserta DatabasenyaTutorial Pembuatan Aplikasi Website Beserta Databasenya
Tutorial Pembuatan Aplikasi Website Beserta Databasenya
 
Pendahuluan profesi kependidikan
Pendahuluan profesi kependidikanPendahuluan profesi kependidikan
Pendahuluan profesi kependidikan
 
Музыка перевода. Избранные работы за 2010 г.
Музыка перевода. Избранные работы за 2010 г.Музыка перевода. Избранные работы за 2010 г.
Музыка перевода. Избранные работы за 2010 г.
 
Nominaconceptos2011
Nominaconceptos2011Nominaconceptos2011
Nominaconceptos2011
 
Теплица Омега
Теплица ОмегаТеплица Омега
Теплица Омега
 
Woodstock School Religious Life Policy
Woodstock School Religious Life PolicyWoodstock School Religious Life Policy
Woodstock School Religious Life Policy
 
31. cost of bc care
31. cost of bc care31. cost of bc care
31. cost of bc care
 
Carpintería
CarpinteríaCarpintería
Carpintería
 
Communication Catalysts: Changing the World by Doing Our Jobs
Communication Catalysts: Changing the World by Doing Our JobsCommunication Catalysts: Changing the World by Doing Our Jobs
Communication Catalysts: Changing the World by Doing Our Jobs
 
Steve Dean: Washing My Eyelids
Steve Dean: Washing My EyelidsSteve Dean: Washing My Eyelids
Steve Dean: Washing My Eyelids
 
Maximilian Gotzler: A Testosterone and Diet Experiment
Maximilian Gotzler: A Testosterone and Diet ExperimentMaximilian Gotzler: A Testosterone and Diet Experiment
Maximilian Gotzler: A Testosterone and Diet Experiment
 
Massif by Steve Matteson
Massif by Steve MattesonMassif by Steve Matteson
Massif by Steve Matteson
 
Accord pp001
Accord pp001Accord pp001
Accord pp001
 
Энергофлекс Супер
Энергофлекс СуперЭнергофлекс Супер
Энергофлекс Супер
 
Membuat halaman toko online
Membuat halaman toko onlineMembuat halaman toko online
Membuat halaman toko online
 
Rediscover Pompei - numbered edition Pen
Rediscover Pompei - numbered edition PenRediscover Pompei - numbered edition Pen
Rediscover Pompei - numbered edition Pen
 
Windows8
Windows8Windows8
Windows8
 
1 check your_english_vocabulary_for_law
1 check your_english_vocabulary_for_law1 check your_english_vocabulary_for_law
1 check your_english_vocabulary_for_law
 

Similar to Web Application PHP and MySQL Database

Ex[1].3 php db connectivity
Ex[1].3 php db connectivityEx[1].3 php db connectivity
Ex[1].3 php db connectivityMouli Chandira
 
Ilmu sosial dasar - Pembuatan CV - HTML
Ilmu sosial dasar - Pembuatan CV  - HTMLIlmu sosial dasar - Pembuatan CV  - HTML
Ilmu sosial dasar - Pembuatan CV - HTMLIgnatiusAdityaKurnia
 
Your Custom WordPress Admin Pages Suck
Your Custom WordPress Admin Pages SuckYour Custom WordPress Admin Pages Suck
Your Custom WordPress Admin Pages SuckAnthony Montalbano
 
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)Pat Patterson
 
html xmlnsv=urnschemas-microsoft-comvmlxmlnso=urnschem
html xmlnsv=urnschemas-microsoft-comvmlxmlnso=urnschemhtml xmlnsv=urnschemas-microsoft-comvmlxmlnso=urnschem
html xmlnsv=urnschemas-microsoft-comvmlxmlnso=urnschemPazSilviapm
 
Onde mora a produtividade do Ruby on Rails?
Onde mora a produtividade do Ruby on Rails?Onde mora a produtividade do Ruby on Rails?
Onde mora a produtividade do Ruby on Rails?Fabio Kung
 
The HyperText Markup Language or HTML is the standard markup language
The HyperText Markup Language or HTML is the standard markup languageThe HyperText Markup Language or HTML is the standard markup language
The HyperText Markup Language or HTML is the standard markup languageLovely Professional University
 
Web Security Mistakes: Trusting The Client
Web Security Mistakes: Trusting The ClientWeb Security Mistakes: Trusting The Client
Web Security Mistakes: Trusting The Clientgrutz
 
Web Scripting Project JavaScripts and HTML WebPage
Web Scripting Project JavaScripts and HTML WebPageWeb Scripting Project JavaScripts and HTML WebPage
Web Scripting Project JavaScripts and HTML WebPageSunny U Okoro
 
jQuery Mobile - Desenvolvimento para dispositivos móveis
jQuery Mobile - Desenvolvimento para dispositivos móveisjQuery Mobile - Desenvolvimento para dispositivos móveis
jQuery Mobile - Desenvolvimento para dispositivos móveisPablo Garrido
 

Similar to Web Application PHP and MySQL Database (20)

Ex[1].3 php db connectivity
Ex[1].3 php db connectivityEx[1].3 php db connectivity
Ex[1].3 php db connectivity
 
Ilmu sosial dasar - Pembuatan CV - HTML
Ilmu sosial dasar - Pembuatan CV  - HTMLIlmu sosial dasar - Pembuatan CV  - HTML
Ilmu sosial dasar - Pembuatan CV - HTML
 
Update statement in PHP
Update statement in PHPUpdate statement in PHP
Update statement in PHP
 
Your Custom WordPress Admin Pages Suck
Your Custom WordPress Admin Pages SuckYour Custom WordPress Admin Pages Suck
Your Custom WordPress Admin Pages Suck
 
Broadleaf Presents Thymeleaf
Broadleaf Presents ThymeleafBroadleaf Presents Thymeleaf
Broadleaf Presents Thymeleaf
 
Delete statement in PHP
Delete statement in PHPDelete statement in PHP
Delete statement in PHP
 
Synapse india basic php development part 2
Synapse india basic php development part 2Synapse india basic php development part 2
Synapse india basic php development part 2
 
Lab final
Lab finalLab final
Lab final
 
Greenberg, Starr, Kunze, and Hammond, "Show Me the Data: Managing Data Sets f...
Greenberg, Starr, Kunze, and Hammond, "Show Me the Data: Managing Data Sets f...Greenberg, Starr, Kunze, and Hammond, "Show Me the Data: Managing Data Sets f...
Greenberg, Starr, Kunze, and Hammond, "Show Me the Data: Managing Data Sets f...
 
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
 
Capstone Website Code
Capstone Website CodeCapstone Website Code
Capstone Website Code
 
Sessionex1
Sessionex1Sessionex1
Sessionex1
 
html xmlnsv=urnschemas-microsoft-comvmlxmlnso=urnschem
html xmlnsv=urnschemas-microsoft-comvmlxmlnso=urnschemhtml xmlnsv=urnschemas-microsoft-comvmlxmlnso=urnschem
html xmlnsv=urnschemas-microsoft-comvmlxmlnso=urnschem
 
Database connectivity in PHP
Database connectivity in PHPDatabase connectivity in PHP
Database connectivity in PHP
 
Onde mora a produtividade do Ruby on Rails?
Onde mora a produtividade do Ruby on Rails?Onde mora a produtividade do Ruby on Rails?
Onde mora a produtividade do Ruby on Rails?
 
JS-05-Handlebars.ppt
JS-05-Handlebars.pptJS-05-Handlebars.ppt
JS-05-Handlebars.ppt
 
The HyperText Markup Language or HTML is the standard markup language
The HyperText Markup Language or HTML is the standard markup languageThe HyperText Markup Language or HTML is the standard markup language
The HyperText Markup Language or HTML is the standard markup language
 
Web Security Mistakes: Trusting The Client
Web Security Mistakes: Trusting The ClientWeb Security Mistakes: Trusting The Client
Web Security Mistakes: Trusting The Client
 
Web Scripting Project JavaScripts and HTML WebPage
Web Scripting Project JavaScripts and HTML WebPageWeb Scripting Project JavaScripts and HTML WebPage
Web Scripting Project JavaScripts and HTML WebPage
 
jQuery Mobile - Desenvolvimento para dispositivos móveis
jQuery Mobile - Desenvolvimento para dispositivos móveisjQuery Mobile - Desenvolvimento para dispositivos móveis
jQuery Mobile - Desenvolvimento para dispositivos móveis
 

More from Sunny U Okoro

SQL Server and SSAS
SQL Server and SSAS SQL Server and SSAS
SQL Server and SSAS Sunny U Okoro
 
BI Apps Reports 5 QlikSense Desktop
BI Apps Reports 5  QlikSense DesktopBI Apps Reports 5  QlikSense Desktop
BI Apps Reports 5 QlikSense DesktopSunny U Okoro
 
MS SSAS 2008 & MDX Reports
MS SSAS 2008 &  MDX Reports MS SSAS 2008 &  MDX Reports
MS SSAS 2008 & MDX Reports Sunny U Okoro
 
DBA Oracle,SQL Server, MYSQL,DB2 Express Postgres & Sybase
DBA Oracle,SQL Server, MYSQL,DB2 Express Postgres & SybaseDBA Oracle,SQL Server, MYSQL,DB2 Express Postgres & Sybase
DBA Oracle,SQL Server, MYSQL,DB2 Express Postgres & SybaseSunny U Okoro
 
BI Apps ETL 4- Informatica PowerCenter Express
BI  Apps ETL 4- Informatica PowerCenter  ExpressBI  Apps ETL 4- Informatica PowerCenter  Express
BI Apps ETL 4- Informatica PowerCenter ExpressSunny U Okoro
 
BI Apps Reports 4 Cognos BI and Crystal Reports
BI Apps Reports 4  Cognos BI and Crystal ReportsBI Apps Reports 4  Cognos BI and Crystal Reports
BI Apps Reports 4 Cognos BI and Crystal ReportsSunny U Okoro
 
Tableau Reports and Oracle OBIEE
Tableau Reports and  Oracle OBIEETableau Reports and  Oracle OBIEE
Tableau Reports and Oracle OBIEESunny U Okoro
 
DB 3 Sybase ASE 15 & MS SQL Server
DB 3 Sybase ASE 15 & MS SQL Server DB 3 Sybase ASE 15 & MS SQL Server
DB 3 Sybase ASE 15 & MS SQL Server Sunny U Okoro
 
Advanced ETL2 Pentaho
Advanced ETL2  Pentaho Advanced ETL2  Pentaho
Advanced ETL2 Pentaho Sunny U Okoro
 
BI Apps Reports2- Oracle OBIEE & SAP Business Objects
BI Apps Reports2- Oracle OBIEE & SAP Business ObjectsBI Apps Reports2- Oracle OBIEE & SAP Business Objects
BI Apps Reports2- Oracle OBIEE & SAP Business ObjectsSunny U Okoro
 
MiS SharePoint 2010-SSRS, Power View & PowerPivot 2012
MiS SharePoint 2010-SSRS, Power View & PowerPivot 2012MiS SharePoint 2010-SSRS, Power View & PowerPivot 2012
MiS SharePoint 2010-SSRS, Power View & PowerPivot 2012Sunny U Okoro
 
BI Apps OLAP & Reports- SSAS 2012 Tabular & Multidimensional
BI Apps  OLAP & Reports- SSAS 2012 Tabular & Multidimensional BI Apps  OLAP & Reports- SSAS 2012 Tabular & Multidimensional
BI Apps OLAP & Reports- SSAS 2012 Tabular & Multidimensional Sunny U Okoro
 
Advanced SSRS 2012-SSAS,SSIS, XML, ASP.NET,Forms
Advanced SSRS 2012-SSAS,SSIS, XML, ASP.NET,FormsAdvanced SSRS 2012-SSAS,SSIS, XML, ASP.NET,Forms
Advanced SSRS 2012-SSAS,SSIS, XML, ASP.NET,FormsSunny U Okoro
 
Advanced ETL MS SSIS 2012 & Talend
Advanced ETL  MS  SSIS 2012 & Talend Advanced ETL  MS  SSIS 2012 & Talend
Advanced ETL MS SSIS 2012 & Talend Sunny U Okoro
 
DB Develop 2 Oracle 12c, DB2, MYSQL, SQL Anywhere 16
 DB Develop 2 Oracle 12c, DB2, MYSQL, SQL Anywhere 16  DB Develop 2 Oracle 12c, DB2, MYSQL, SQL Anywhere 16
DB Develop 2 Oracle 12c, DB2, MYSQL, SQL Anywhere 16 Sunny U Okoro
 
DB Security Oracle 11g-Application Context, Dynamic Views & Aduits
DB Security Oracle 11g-Application Context, Dynamic Views & AduitsDB Security Oracle 11g-Application Context, Dynamic Views & Aduits
DB Security Oracle 11g-Application Context, Dynamic Views & AduitsSunny U Okoro
 

More from Sunny U Okoro (20)

SQL Server and SSAS
SQL Server and SSAS SQL Server and SSAS
SQL Server and SSAS
 
BI Apps Reports 5 QlikSense Desktop
BI Apps Reports 5  QlikSense DesktopBI Apps Reports 5  QlikSense Desktop
BI Apps Reports 5 QlikSense Desktop
 
MS SSAS 2008 & MDX Reports
MS SSAS 2008 &  MDX Reports MS SSAS 2008 &  MDX Reports
MS SSAS 2008 & MDX Reports
 
DBA Oracle,SQL Server, MYSQL,DB2 Express Postgres & Sybase
DBA Oracle,SQL Server, MYSQL,DB2 Express Postgres & SybaseDBA Oracle,SQL Server, MYSQL,DB2 Express Postgres & Sybase
DBA Oracle,SQL Server, MYSQL,DB2 Express Postgres & Sybase
 
Database Migration
Database MigrationDatabase Migration
Database Migration
 
Cognos Express
Cognos ExpressCognos Express
Cognos Express
 
BI Apps ETL 4- Informatica PowerCenter Express
BI  Apps ETL 4- Informatica PowerCenter  ExpressBI  Apps ETL 4- Informatica PowerCenter  Express
BI Apps ETL 4- Informatica PowerCenter Express
 
Oracle ODI
Oracle ODIOracle ODI
Oracle ODI
 
BI Apps Reports 4 Cognos BI and Crystal Reports
BI Apps Reports 4  Cognos BI and Crystal ReportsBI Apps Reports 4  Cognos BI and Crystal Reports
BI Apps Reports 4 Cognos BI and Crystal Reports
 
Tableau Reports and Oracle OBIEE
Tableau Reports and  Oracle OBIEETableau Reports and  Oracle OBIEE
Tableau Reports and Oracle OBIEE
 
DB 3 Sybase ASE 15 & MS SQL Server
DB 3 Sybase ASE 15 & MS SQL Server DB 3 Sybase ASE 15 & MS SQL Server
DB 3 Sybase ASE 15 & MS SQL Server
 
MS SSAS 2012 & MDX
MS SSAS 2012  &  MDXMS SSAS 2012  &  MDX
MS SSAS 2012 & MDX
 
Advanced ETL2 Pentaho
Advanced ETL2  Pentaho Advanced ETL2  Pentaho
Advanced ETL2 Pentaho
 
BI Apps Reports2- Oracle OBIEE & SAP Business Objects
BI Apps Reports2- Oracle OBIEE & SAP Business ObjectsBI Apps Reports2- Oracle OBIEE & SAP Business Objects
BI Apps Reports2- Oracle OBIEE & SAP Business Objects
 
MiS SharePoint 2010-SSRS, Power View & PowerPivot 2012
MiS SharePoint 2010-SSRS, Power View & PowerPivot 2012MiS SharePoint 2010-SSRS, Power View & PowerPivot 2012
MiS SharePoint 2010-SSRS, Power View & PowerPivot 2012
 
BI Apps OLAP & Reports- SSAS 2012 Tabular & Multidimensional
BI Apps  OLAP & Reports- SSAS 2012 Tabular & Multidimensional BI Apps  OLAP & Reports- SSAS 2012 Tabular & Multidimensional
BI Apps OLAP & Reports- SSAS 2012 Tabular & Multidimensional
 
Advanced SSRS 2012-SSAS,SSIS, XML, ASP.NET,Forms
Advanced SSRS 2012-SSAS,SSIS, XML, ASP.NET,FormsAdvanced SSRS 2012-SSAS,SSIS, XML, ASP.NET,Forms
Advanced SSRS 2012-SSAS,SSIS, XML, ASP.NET,Forms
 
Advanced ETL MS SSIS 2012 & Talend
Advanced ETL  MS  SSIS 2012 & Talend Advanced ETL  MS  SSIS 2012 & Talend
Advanced ETL MS SSIS 2012 & Talend
 
DB Develop 2 Oracle 12c, DB2, MYSQL, SQL Anywhere 16
 DB Develop 2 Oracle 12c, DB2, MYSQL, SQL Anywhere 16  DB Develop 2 Oracle 12c, DB2, MYSQL, SQL Anywhere 16
DB Develop 2 Oracle 12c, DB2, MYSQL, SQL Anywhere 16
 
DB Security Oracle 11g-Application Context, Dynamic Views & Aduits
DB Security Oracle 11g-Application Context, Dynamic Views & AduitsDB Security Oracle 11g-Application Context, Dynamic Views & Aduits
DB Security Oracle 11g-Application Context, Dynamic Views & Aduits
 

Recently uploaded

Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 

Recently uploaded (20)

Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 

Web Application PHP and MySQL Database

  • 1. Web Database Applications PHP and MYSQL Database Web Application By Sunny Okoro
  • 2. Contents Introduction ..................................................................................................................................................2 Development Tools.......................................................................................................................................2 Student Application System..........................................................................................................................3 Student Application System Codes...............................................................................................................7 Student Application System 2.....................................................................................................................10 Student Application System 2 Code............................................................................................................11 Student Application System 3.....................................................................................................................13 Student Application System Code 3............................................................................................................14
  • 3. Introduction This documents contains few web applications written in PHP and HTML scripting language that would allow a user to interact with a MySQL database Development Tools Database Platform: MySQL Web Scripting Languages: PHP and HTML Web Server: EASY PHP 5.3.8.1 with Apache
  • 4. Student Application System Now insert some records into the database by completing the required information.
  • 5.
  • 6. Verify that the information has been inserted into the database to their corresponding table. Student is the database and school is the table. To accomplish this task, a query is needed.
  • 7.
  • 8. Student Application System Codes <?php /***************************************************** This display array POST *****************************************************/ //echo "<pre>"; //print_r($_POST); //echo "</pre>"; /***************************************************** Create variables with information from array POST *****************************************************/ $FirstName = $_POST["FirstName"]; $LastName = $_POST["LastName"]; $Email=$_POST["Email"]; $Gender =$_POST ["Gender"]; $Password=$_POST["Password"]; $ConfirmPassword=$_POST ["ConfirmPassword"]; $StudentYear=$_POST["StudentYear"]; $Interest=$_POST["Interest"]; $picture = $_POST["picture"]; $profile = $_POST["profile"]; $Sports = $_POST["Sports"]; /************************************* connect to mysql ********************************************/ $server = "Localhost"; // Server name $user = "root"; // User name $pass = "" ; // password $connect = mysql_connect($server, $user, $pass) or die ("Error: Bad connection" ); $sel = mysql_select_db('school') or die("Error: Bad connection"); $sql = "INSERT INTO Student (FirstName, LastName, Email, Gender, Password, ConfirmPassword, StudentYear, Interest, picture, profile, Sports)"; $sql .= "VALUES ("$FirstName", "$LastName", "$Email", "$Gender","$Password", "$ConfirmPassword", "$StudentYear", "$Interest", "$picture","$profile", "$Sports" )"; $query = mysql_query($sql); $numRows = mysql_affected_rows($connect); if ($numRows == 1) echo "<h1> New student added</h1>";
  • 9. mysql_close($connect); ?> <HTML> <html> <body> <form method= "post" action="student.php"> <h1> New Student </H1> <table allign ="center" border="1" bgcolor="green"> <tr> <td align = "right"> FIRST NAME: </td> <td><input type="text" name="FirstName"></td> </tr> <tr> <td align = "right"> LAST NAME: </td> <td><input type="text" name="LastName"></td> </tr> <tr> <td align = "right"> Email: </td> <td><input type= "text" name="Email"></td> </tr> <tr> <td align = "right"> Gender: </td> <td> <input type="radio" name="Gender" value="Male">Male <br> <input type="radio" name="Gender" value="Female">Female </td> </tr> <tr> <td align = "right"> Password: </td> <td><input type= "password" name= "Password"></td> </tr> <tr> <td align = "right"> ConfirmPassword: </td> <td><input type= "password" name= "ConfirmPassword"></td> </tr>
  • 10. <tr> <td align = "right"> Student Year:</td> <td> <select name = "StudentYear"> <option >Freshman </option> <option>Sophmore </option> <option>Junior </option> <option>Senior</option> <br> </select></td> </tr> <tr> <td align = "right"> Interest:</td> <td><textarea name= "Interest"></textarea></td> </tr> <tr> <td align = "right"> Options:</td> <td><input type="checkbox" name="picture" value = "Share profile "/>Share my profile <input type="checkbox" name="profile" value = "Show picture"/>Share my picture </td> </tr> <tr> <td align = "right"> Sports:</td> <td><select name= "Sports"> <option>Football</option> <option>Baseball</option> <option>Basketball</option> <option>Volleyball</option> <option>Tennis</option> </select> </td> </tr> </table> <button type ="submit" value ="Submit" name= "Submit"> Submit <img src="http://farm3.static.flickr.com/2038/1830883816_7e6444f018.jpg" width= "50" height="50"> </button> <button type ="Reset" value ="Reset" name= "Reset" > Reset <img src="http://www.houstonexpress.net/images/houston2.jpg" width= "50" height="50"><br /> </button> </form>
  • 11. </body </html> <Database> Drop database if exists school; Create database if not exists school; Use school; CREATE TABLE student( StudentID int NOT NULL AUTO_INCREMENT, FirstName char(20) NOT NULL, LastName char(20) NOT NULL, Email varchar(30) NOT NULL, Gender char(6) NOT NULL, Password Varchar(20) NOT NULL, ConfirmPassword Varchar(20) NOT NULL, StudentYear char(11) NOT NULL, Interest Text NOT NULL, Picture char (20) NOT NULL, Profile char(20) NOT NULL, Sports char(42) NOT NULL, PRIMARY KEY(StudentID) ); Student Application System 2 Instead of having the user login in to the database to access the data, the user can open a web application which displays the content of the database back to them for security reasons.
  • 12. Student Application System 2 Code <?php //echo "<pre>"; //print_r($_POST); //echo "</pre>"; /********************************************** connect to mysql ********************************************/ $server = "Localhost"; // Server name $user = "root"; // User name $pass = "" ; // password /******************************************** Display message if connection falied **********************************************/ $connect = mysql_connect($server, $user, $pass) or die ("Error: Bad connection" );
  • 13. $select = mysql_select_db("school"); if(!$select) exit("Error: Could not select database!"); $sql = "SELECT * FROM student"; $query = mysql_query($sql); if (mysql_num_rows($query) == 0) { echo "No records found"; } else { echo "<table align=center border = 1>"; echo"<tr>"; echo "<td><b>StudentID</td>"; echo "<td><b>FirstName</td>"; echo "<td><b>LastName</td>"; echo "<td><b>Email</td>"; echo "<td><b>Gender</td>"; echo "<td><b>Password</td>"; echo "<td><b>ConfirmPassword<td>"; echo "<td><b>StudentYear<b></td>"; echo "<td><b>Interest</td>"; echo "<td><b>profile</td>"; echo "<td><b>picture</td>"; echo "<td><b>Sports</td>"; echo"</tr>"; while($row = mysql_fetch_object($query)) { echo"<tr>"; echo "<td>".$row->StudentID."</td>"; echo "<td>".$row->FirstName."</td>"; echo "<td>".$row->LastName."</td>"; echo "<td>".$row->Email."</td>"; echo "<td>".$row->Gender."</td>"; echo "<td>".$row->Password."</td>"; echo "<td>".$row->ConfirmPassword."<td>"; echo "<td>".$row->StudentYear."</td>"; echo "<td>".$row->Interest."</td>"; echo "<td>".$row->Profile."</td>"; echo "<td>".$row->Picture."</td>"; echo "<td>".$row->Sports."</td>"; }
  • 14. echo"</tr>"; } echo"</table>"; mysql_close($connect); ?> Student Application System 3 The user can use the student identification number to specify the student they want their data to displayed back instead of using the general query of select * from student by using a web application.
  • 15. Student Application System Code3 <student.html> <html> <title> STUDENT DATA </title> <head><h1>STUDENT DATA </h1></head> <body> <form method= "post" action="table2.php"> Student ID<input type = "text" name ="STUDENTID"> </input> <p> <button type ="submit" value ="Submit" name= "Submit"> Submit </button> <button type ="Reset" value ="Reset" name= "Reset" > Reset </button>
  • 16. <table2.php file> <?php //echo "<pre>"; //print_r($_POST); //echo "</pre>"; /********************************************** connect to mysql ********************************************/ $server = "Localhost"; // Server name $user = "root"; // User name $pass = "" ; // password /******************************************** Display message if connection falied **********************************************/ $connect = mysql_connect($server, $user, $pass) or die ("Error: Bad connection" ); $select = mysql_select_db("school"); if(!$select) exit("Error: Could not select database!"); $sql = "SELECT * FROM student WHERE STUDENTID = STUDENTID"; $query = mysql_query($sql); if (mysql_num_rows($query) == 0) { echo "No records found"; } else { echo "<table align=center border = 1>"; echo"<tr>"; echo "<td><b>StudentID</td>"; echo "<td><b>FirstName</td>"; echo "<td><b>LastName</td>"; echo "<td><b>Email</td>"; echo "<td><b>Gender</td>"; echo "<td><b>Password</td>"; echo "<td><b>ConfirmPassword<td>"; echo "<td><b>StudentYear<b></td>"; echo "<td><b>Interest</td>"; echo "<td><b>profile</td>";
  • 17. echo "<td><b>picture</td>"; echo "<td><b>Sports</td>"; echo"</tr>"; while($row = mysql_fetch_object($query)) { echo"<tr>"; echo "<td>".$row->StudentID."</td>"; echo "<td>".$row->FirstName."</td>"; echo "<td>".$row->LastName."</td>"; echo "<td>".$row->Email."</td>"; echo "<td>".$row->Gender."</td>"; echo "<td>".$row->Password."</td>"; echo "<td>".$row->ConfirmPassword."<td>"; echo "<td>".$row->StudentYear."</td>"; echo "<td>".$row->Interest."</td>"; echo "<td>".$row->Profile."</td>"; echo "<td>".$row->Picture."</td>"; echo "<td>".$row->Sports."</td>"; } echo"</tr>"; } echo"</table>"; mysql_close($connect); ?>