Anda di halaman 1dari 38

P7-a

PHP MySQL
ASP

PHP5

HTML5
Web Programming A. Sidiq P.
CSS

JSP
Prodi Teknik Informatika
Fakultas Teknologi Informasi
Universitas Mercu Buana Yogyakarta
ASP

PHP5

HTML5
Web Programming

CSS

PHP MySQL JSP

By : Verri Andriawan
@tiduronline (IG)
https://tiduronline.com/

SQ - http://sidiq.mercubuana-yogya.ac.id
2
dnd_07june07@live.com
PHP MySQL

Why MySQL ?
• MySQL is a database system used on the web
• With PHP, you can connect to • MySQL is a database system that runs on a server
and manipulate databases. • MySQL is ideal for both small and large
applications
• MySQL is the most popular • MySQL is very fast, reliable, and easy to use
database system used with PHP. • MySQL uses standard SQL
• MySQL compiles on a number of platforms
• MySQL is free to download and use
• MySQL is developed, distributed, and supported by
Oracle Corporation
• MySQL is named after co-founder Monty
Widenius's daughter: My

SQ - http://sidiq.mercubuana-yogya.ac.id
3
dnd_07june07@live.com
• PHP 5 and later can work with a MySQL database using:
• MySQLi extension (the "i" stands for improved)
• Object Oriented
• Procedural
• PDO (PHP Data Objects)
• Earlier versions of PHP used the MySQL extension. However, this
extension was deprecated in 2012.

SQ - http://sidiq.mercubuana-yogya.ac.id
4
dnd_07june07@live.com
Should I Use MySQLi or PDO?
• If you need a short answer, it would be "Whatever you like".
• Both MySQLi and PDO have their advantages:
• PDO will work on 12 different database systems, whereas MySQLi will only
work with MySQL databases.
• So, if you have to switch your project to use another database, PDO makes
the process easy. You only have to change the connection string and a few
queries. With MySQLi, you will need to rewrite the entire code - queries
included.
• Both are object-oriented, but MySQLi also offers a procedural API.
• Both support Prepared Statements. Prepared Statements protect from SQL
injection, and are very important for web application security.
SQ - http://sidiq.mercubuana-yogya.ac.id
5
dnd_07june07@live.com
ASP

PHP5

HTML5

PHP - MySQLi Web Programming

CSS

(Object Oriented) JSP

By : Verri Andriawan
@tiduronline (IG)
https://tiduronline.com/

SQ - http://sidiq.mercubuana-yogya.ac.id
6
dnd_07june07@live.com
Connect - MySQLi (object-oriented)

SQ - http://sidiq.mercubuana-yogya.ac.id
7
dnd_07june07@live.com
Create a MySQL Database

SQ - http://sidiq.mercubuana-yogya.ac.id
8
dnd_07june07@live.com
Create a Table

SQ - http://sidiq.mercubuana-yogya.ac.id
9
dnd_07june07@live.com
Insert Data Into MySQL

SQ - http://sidiq.mercubuana-yogya.ac.id
10
dnd_07june07@live.com
Select Data From MySQL

SQ - http://sidiq.mercubuana-yogya.ac.id
11
dnd_07june07@live.com
Delete Data From MySQL

SQ - http://sidiq.mercubuana-yogya.ac.id
12
dnd_07june07@live.com
Update Data in MySQL

SQ - http://sidiq.mercubuana-yogya.ac.id
13
dnd_07june07@live.com
PHP Prepared Statements

A prepared statement is a feature used to execute


the same (or similar) SQL statements repeatedly
with high efficiency.

The argument may be one of four types:


• i - integer
• d - double
• s - string
• b - BLOB

SQ - http://sidiq.mercubuana-yogya.ac.id
14
dnd_07june07@live.com
ASP

PHP5

HTML5

Case Study Web Programming

CSS

Login JSP

By : Verri Andriawan
@tiduronline (IG)
https://tiduronline.com/

SQ - http://sidiq.mercubuana-yogya.ac.id
15
dnd_07june07@live.com
Table

SQ - http://sidiq.mercubuana-yogya.ac.id
16
dnd_07june07@live.com
Connect DB

SQ - http://sidiq.mercubuana-yogya.ac.id
17
dnd_07june07@live.com
Index (Login)

SQ - http://sidiq.mercubuana-yogya.ac.id
18
dnd_07june07@live.com
Login Check

SQ - http://sidiq.mercubuana-yogya.ac.id
19
dnd_07june07@live.com
Home

SQ - http://sidiq.mercubuana-yogya.ac.id
20
dnd_07june07@live.com
SQ - http://sidiq.mercubuana-yogya.ac.id
21
dnd_07june07@live.com
SQ - http://sidiq.mercubuana-yogya.ac.id
22
dnd_07june07@live.com
Logout

SQ - http://sidiq.mercubuana-yogya.ac.id
23
dnd_07june07@live.com
Register (View)

SQ - http://sidiq.mercubuana-yogya.ac.id
24
dnd_07june07@live.com
Register Add Action

SQ - http://sidiq.mercubuana-yogya.ac.id
25
dnd_07june07@live.com
Register View

SQ - http://sidiq.mercubuana-yogya.ac.id
26
dnd_07june07@live.com
Register Edit

SQ - http://sidiq.mercubuana-yogya.ac.id
27
dnd_07june07@live.com
SQ - http://sidiq.mercubuana-yogya.ac.id
28
dnd_07june07@live.com
Register Edit Action

SQ - http://sidiq.mercubuana-yogya.ac.id
29
dnd_07june07@live.com
Register Delete

SQ - http://sidiq.mercubuana-yogya.ac.id
30
dnd_07june07@live.com
View

SQ - http://sidiq.mercubuana-yogya.ac.id
31
dnd_07june07@live.com
SQ - http://sidiq.mercubuana-yogya.ac.id
32
dnd_07june07@live.com
SQ - http://sidiq.mercubuana-yogya.ac.id
33
dnd_07june07@live.com
SQ - http://sidiq.mercubuana-yogya.ac.id
34
dnd_07june07@live.com
ASP

PHP5

HTML5
Web Programming

PHP7  Next Slide


CSS

JSP

By : Verri Andriawan
@tiduronline (IG)
https://tiduronline.com/

SQ - http://sidiq.mercubuana-yogya.ac.id
35
dnd_07june07@live.com
SQ - http://sidiq.mercubuana-yogya.ac.id
36
dnd_07june07@live.com
SQ - http://sidiq.mercubuana-yogya.ac.id
37
dnd_07june07@live.com
Tugas
• Buatlah tabel mahasiswa (nim, nama, prodi, gender, th_masuk)
• Berdasakan tabel yg telah dibuat, Buatlah halaman untuk :
• Insert
• Update
• Delete
• View

SQ - http://sidiq.mercubuana-yogya.ac.id
38
dnd_07june07@live.com

Anda mungkin juga menyukai