view data PHP
Summary
TLDRThis video tutorial offers a step-by-step guide on creating a database schema using PHP's native capabilities. The host begins by setting up a database and navigating to the PHPMyAdmin interface. They demonstrate how to create a new table, define columns, and set properties like auto-increment. The script then shifts to developing a PHP application, including HTML file setup and PHP syntax for database connection and querying. The tutorial concludes with inserting sample data and displaying it on a webpage, ensuring the process is accessible to beginners.
Takeaways
- đ The video is a tutorial on creating a database style using PHP native.
- đ§ The presenter suggests preparing the database first and provides guidance on how to access it.
- đ It's mentioned that there's a tutorial on installing PHP on the channel for those who need it.
- đ» The video covers the process of navigating to localhost and setting up an admin panel for database management.
- đ ïž The script explains how to create a new database and name it, using 'Create database' option.
- đ The presenter describes creating a table within the database by specifying column names and types.
- đ It's highlighted that one of the columns should be set as 'autoincrement' for automatic data entry.
- đ The video includes a step-by-step guide on inserting data into the newly created table.
- đ The presenter discusses setting up the application side, including creating necessary HTML and PHP files.
- đïž The tutorial touches on the basics of HTML structure, including the use of 'table' to organize data.
- đ The script explains the use of PHP syntax for connecting to the database and executing SQL queries to fetch data.
Q & A
What is the main topic of the video?
-The main topic of the video is creating a data style from a database using PHP native.
What is the first step mentioned in the video for setting up the database?
-The first step is to prepare the database, which might involve installing PHP if it's not already installed.
What is the address to access the database setup in the video?
-The address to access the database setup is 'localhost/phpmyadmin'.
How does the video suggest creating a new database in phpMyAdmin?
-The video suggests clicking on 'New' and then typing in 'Create database' to create a new database.
What is the name of the database created in the video?
-The name of the database created is 'ellen'.
What are the steps to create a new table in the database as shown in the video?
-The steps include clicking on the database name, then clicking on 'New', entering the table name, and defining columns with their respective names and data types.
What is the purpose of setting 'autoincrement' for the 'kode' column in the table?
-Setting 'autoincrement' for the 'kode' column allows the system to automatically increment the value for each new entry, ensuring unique identifiers for each record.
How does the video demonstrate inserting data into the database?
-The video demonstrates inserting data by manually entering values for each column in the table through the phpMyAdmin interface.
What is the suggested file structure for the PHP application as per the video?
-The suggested file structure includes creating a folder named 'flash' and files such as 'index.php', 'controller.php', and 'model.php' within a 'www' directory.
How does the video guide the process of connecting to the database using PHP?
-The video guides the process by creating a 'config.php' file that contains the database connection details and using PHP's 'mysqli_connect' function to establish a connection.
What is the purpose of the SQL query shown in the video?
-The SQL query is used to select all records from the 'perusahaan' table and is intended to display the data on the web page.
How does the video handle displaying data from the database on a web page?
-The video demonstrates using a loop in PHP to fetch data from the database and then display it within an HTML table structure on the web page.
Outlines
đ Introduction to PHP Database Styling
The video begins with an introduction to creating a database style using PHP's native capabilities. The presenter suggests preparing the database first, mentioning a tutorial on installing PHP on a local server. The audience is guided through accessing the database via a browser using 'localhost' and logging in with provided credentials. The presenter then instructs on creating a new database and setting up its structure, including naming columns and specifying data types, with an emphasis on auto-incrementing IDs for company codes.
đ Database Table Creation and Data Insertion
This paragraph covers the process of creating a table within a database and inserting data into it. The presenter explains how to define the structure of a 'perusahaan' (company) table, including columns for company code, name, address, phone, and email. The audience is shown how to input data for a company, including setting up an auto-incrementing primary key. The presenter also discusses potential issues that may arise during data insertion and how to address them.
đ ïž Setting Up the PHP Application Environment
The script moves on to setting up the PHP application environment. The presenter outlines the need for HTML files and suggests creating a directory structure for the project. They guide the audience through creating PHP files for the application, emphasizing the importance of using the correct file extensions. The video also touches on the basics of HTML structure, including the use of 'html' and 'body' tags.
đ PHP Syntax for Database Interaction
In this part, the presenter delves into the PHP syntax required to interact with a database. They explain the need for a 'config.php' file to handle database connections and a 'query' to fetch data. The audience is shown how to write the PHP code for connecting to the database and executing a SELECT query to retrieve data from the 'perusahaan' table. The presenter also discusses common errors and how to troubleshoot them.
đ PHP Loop for Displaying Database Records
The final paragraph focuses on using PHP loops to display records from the database. The presenter demonstrates how to modify the HTML structure to incorporate PHP code that iterates over the database results and displays them on a webpage. They provide a step-by-step guide on inserting PHP code within the HTML body to achieve this, ensuring the data from the database is presented in a readable format on the web page.
đ Conclusion and Final Thoughts
The video concludes with a brief summary of the process of creating a PHP-driven web page that displays data from a database. The presenter encourages viewers to pay attention to any errors that may occur and to ensure that the code is correctly implemented. They remind the audience to save their work and to check the browser for the final output, ending the tutorial on a positive note.
Mindmap
Keywords
đĄPHP
đĄDatabase
đĄlocalhost
đĄPHPMyAdmin
đĄTable
đĄColumn
đĄAutoincrement
đĄVARCHAR
đĄHTML
đĄPHP Syntax
đĄConfiguration File
Highlights
Introduction to creating a database style using PHP native.
Preparation of the database before starting the tutorial.
Instructions on how to access the PHPMyAdmin interface.
Explanation of how to create a new database in PHPMyAdmin.
Guidance on naming the database and setting up initial tables.
Creating a table named 'perusahaan' with specific columns.
Setting up auto-increment for the 'kode' column in the table.
Adding columns for company name, address, phone, and email.
Instructions on how to save the table structure in the database.
Demonstration of inserting data into the 'perusahaan' table.
Explanation of potential errors and how to troubleshoot them.
Setting up the application environment with necessary files.
Creating HTML files for the application interface.
Introduction to PHP syntax for database connection and queries.
Creating a 'config.php' file for database connection settings.
Using SQL queries to fetch data from the 'perusahaan' table.
Implementing PHP loops to display data on the HTML page.
Finalizing the application setup and testing in the browser.
Troubleshooting steps if the application does not work as expected.
Conclusion and reminder to follow for more tutorials.
Transcripts
Halo selamat jumpa lagi di video kali
ini kita akan
membuat style data dari basis data
secara sederhana ya menggunakan
PHP native yuk
Ayo kita langsung saja
sebelumnya bisa disiapkan dulu
databasenya
Hai dan dari Insan HP besok kalau yang
nggak tahu jalan misalnya
ada di channel ini cara menginstal HP
besok
kalau sudah bisa langsung
Arahkan
browsernya ke alamat localhost garis
miring PHP maybe
Hai penulisannya gimana tinggal di ikuti
saja ya
localhost.php May admin seperti ini ya
di localhost smake kalau pakai it's
pakai http titik 2
Hai garis miring double localhost
flash.php
May admin
Oh ya
Hai Neng kalau sudah
URL
hai magazine nah serangkai
user-user nyalon passwordnya Ellen May
e-learning
Halo Muti and the
pengen kalau yang belum ada basis
datanya silakan buat diklik new
Hai teknik new
ngetik aja
Create database
one create a Laila Anda bisa karena saya
sudah ada databasenya Allen
paint kalau belum lah buat buat dulu di
sini ya grade Kalau sudah seperti ini
kemudian kita membuat lapisan
ndak habisnya kita membuat databasenya
caranya gimana
caranya sederhana sekali Nah kita
tinggal di sini ada di bawah pohon
tetapi serem adanya Wow klik aja
klik aja kemudian
Hai Masukkan nama kolomnya
nama kolomnya
Hai karena kalau nyata Edi
hai hai
Hai name
the lounge
paint hai oh sorry sorry
hai Sebelumnya kita buat nama tabelnya
dulu nah kabelnya belum ya nama kadonya
kita mau menampilkan data perusahaan nah
di tabel named ditulis aja
erpan1140
Hai kemudian
di kolom pertama
kode-kode perusahaan
di kolom kedua
Hai nama perusahaan secara singkat temen
saya prsh
Halo Mutia nada
Hai alamat
hwaaa jahat telepon
Hai masih kurang satu tambahkan saja nih
Klik go di sini ya aku
Hai Mbak dan email
Hai saya ingin
kode ini
autoincrement jadi dia akan bisa
menambah otomatis
masukkan panjangnya berapa karakter
integer
Hai Yang mutian kalau ada ai centang
saja nih
Ndak indeks pilih Premier
the lounge
ndak bilang seperti ini klik gua aja
paint
Oke kemudian
the lounge
Hai supaya gampang disampaikan saja yang
lainnya tipenya varchar2
Indonesia
varchar rumah panjang adaptornya sanakan
aja biar gampang 100 gitu ya
hai hai
hai oke sudah
Hai kalau sudah
klik save
the lounge
e-cash sampai sini
tabel perusahaan berhasil dibuatnya kita
akan coba memasukkan datanya di tabel
basis data yuk Coba masukkan
Hai perusahaan pertama yang mau
dimasukkan
Hai namanya silakan ketik
value kode ini bisa
10 karena dia nanti akan
auto-increment
Nah mudian alamatnya
Faisal begini ya kemudian
membuat telepon
Hai nah asal saja nih
Kayla
Hai kemudian alamat email
Hai nah yang baris pertama saya mau dua
baris yang kedua bisa dimasukkan
the lounge
eh selamat perusahaannya lagi
ngomonge alamat
Hai nomor telepon
halo halo sudah
klik2d
Hai apa yang terjadi
ini keluarnya
Dian yang terjadi
Indonesia
ia meminta data perusahaan berhasil
dimasukkan
nah berhasil di masukkan Nah sekarang
ditetapkannya sudah selesai kita akan
membuat di sisi aplikasi
Fauzi aplikasi yang harus disiapkan apa
yang pertama adalah
file-file
html5lib html dulu ya
silahkan
siapkan foldernya nah di
direktori
www.foldertips.com tetes
di kemudian
ndak mau
Hai buat folder flash transmisja hujan
membuat file
idex.com php ya kontrol
and1 tphp
Oh yes
nah
pastikan ekstensinya menjadi dot PHP ya
bukan Cut txt jika sudah
pengen buka siapa akhirnya not bad
plus-plus nya notepad-plus-plus kita
akan mencoba
cara membuat es
Hai tabel Mea cara membuat tabel
Indonesia
nya hati kalau
Hai komponen html sederhana misinya akan
tab html
dan body
khate bisa ada bisa ndak takutnya nih
kurang tutupnya nih
the lounge
Hai hewan ini nah
di sini saja sudah bisa Nah untuk
mengisi
Hai pakai
film porno tabel sekadar mengisi tak
body kita mengisi menggunakan
qwerty Hai tabel
nyari duit Ayah kita mengisi menggunakan
tabel
ngisinya gimana nah
Hai di sederhananya
the lounge
ngences saya bus dulu pelan-pelan ya
Hai nah
Hai tadi
halaman html dengan out segini aja sudah
bisa sambil
yo yo kita akan coba memanggilnya cara
manggilnya Gimana kalau tadi
localhost-phpmyadmin sekarang diganti
menjadi localhost
tes tes
localhost tes
Hai kakak bisa berjalan
indikator makro kasus tes
Hai nah
Kailani awal seperti ini ya
halo halo
Hai biasa Nah karena kita ingin
mengambil data dari
Hai database kita memerlukan sintaks PHP
syntax PHP nya seperti apa nah
times in the HPnya seperti apa
yo yo kita buka lagi notnya
Oh ya syntax PHP ya lu
Ayo kita taruh di paling atas
nya
Ayo kita butuh dua syntax yang pertama
inputwts config.py HP ini untuk
memasukkan file konfigurasi ke basis
data mengemudi and the
my god yang kedua dinamakan query ya
untuk memilih
Hai menampilkan apa dari database ke
Hai Yuk kita ubah dulu dari yang pertama
config.py hp berarti di sini kita
memerlukan satu file lagi yang namanya
[Musik]
config.py HP
nya by lagi ke
folder
Ayo kita bikin
the lounge config.py HP ya
Hai juga lagi pakai nobatin
the lounge
the
lounge yah bukan lagi pakai notepad
kemudian
Hai ketikkan kode berikut
Hai nah
Hai Bisa sedih samakan saja
Indonesia
Titi sini
Hai ada variabel yang namanya database
Husni mvcm password nah tetap is named
tadi ya nama databasenya Ellen username
lem password on saya
kemudian
ketikkan ini ya met sekali connect
memanggil function untuk connect ke
basis data
di sini kalau berhasil melihat di sini
kalau berhasil
Indonesia di sini kalau berhasil saya of
Gan dulu
Indonesia
Hai tampilannya di browser akan seperti
apa
Hai tampilannya di browser tidak ada
apa-apa
hai tapi kalau misalkan
Hai saya ganti
Hai ada konfigurasinya yang salah jatam
bahkan X disini Seninnya simpan kembali
lagi ke browser
Hai reload Nah ke-3 ada error nih akses
deenay
jadi jangan kaget kalau nanti ada error
cek lagi konfigurasi data Inggrisnya
the lounge
Gmail login kemudian kembali lagi ke
index.co HP disini Resort Adam SQL Query
in Nah di sini
ada kode lagi Slack Bintang from nah ini
memilih semua dari nama tabel nah di
nama tabelnya apa
Hai nama tabelnya adalah baru saha antre
nama tabelnya adalah perusahaan
Hai jadi ini diganti saja
nah Soleh Bintang from perusahaan order
by nah
Ok Sekarang kita ganti header tabelnya
kita ganti Hijr
stabilnya sesuai dengan nama di database
Nah tadi kan adanya
Hai sepeda tapi yang mana pak ini dengan
ada nama perusahaan Nah klik dua kali
kopi aja nih kontrol C
kembali lagi the text editor
Hai nama perusahaan dari dosanya dihapus
aja ya Hai atau perusahaan ajalah ya
bye berusaha
bahan2 Maaf ujian ada apalagi
Hai Selain itu ngaca alamat Nah nanti
dimasukkan saja di text editor
Oh ya dimasukkan lagi dites editor nah
supaya ndak salah ngetik copy-paste aja
ya ke pipa saja alamat
Hai Oh ya tadi mencetnya struktur ya
alamat
kemudian
Imel pernah
yo yo sama hujan
KMU jadi isi teks editor jadinya seperti
ini
Hai film cek Apakah sudah berhasil jika
Hai diri Los aja tadi
udah berhasilnya sekarang Kidnap buat
isiannya
kita buat isiannya isiannya pakainya apa
pakai kita manfaatkan perulangan
menggunakan
PHP nah Hai perulangan di php nah
diletakkannya di mana Wak
Ndah
Letakkan yang kita buka lagi Text Editor
nya
the lounge
Hai diletakkannya di bawah penutup PR
nih label ruh yuk ke bebas Raj
kepentingan ini
Hai nah
Hai diperhatikan ini ada terbuka berarti
kurang TR tutup mah
CR untuknya ada dimana
Hai televisi rejobanget
Indonesia
Hai nah
the lounge
lebih
Hai
kemudian
diusir datanya Ini diganti nama sesuai
kolom di tabel
Oh maksudnya gimana Pak samain aja
latihan
ini berarti perusahaan
Hai mangsa makan aja nih nama kopi aja
kontrol C
kemudian di
di copy paste
Hai nama perusahaan mudian habis tu
alamat-alamat kipas aja Alamatmu Dian
email ke Ndra ge sampai sini udah
selesai Berarti jangan lupa disimpan
pengen ujian Kita by lagi ke browser
hai cek Apakah sudah berhasil jika
hai tuh
Hai wajah error di Line
hai tuh ini salah nih
aaah
Hai tanda keris bentuknya dihapus flute
Hai Oh masih salah
Hai nah Hai ordernya coba hati aku
sajalah Nila tadi bukan aidya tadi
Hai Nah setelah selesai
bikin Iya gampang sekali cara
Hai pembuatan
tabel biodata
Hai nah
Halo pak Bingung caranya
mulus kodenya bisa pelan-pelan
Hai di paus ya untuk
kodenya nah di sana aja nih dari
Hai buka tak PHP memasukkan
Hai kemudian
melakukan query ini Komentar beli
ditulis boleh ndak
Oh ya mutian bikin html head title
kemudian bikin di dalam body-nya
Hai bisa dipakai saja disamakan
penulisannya ndak ada yang saya
tutup-tutupi samakan
Hai kalau ada error perhatikan lagi
dicek ya pasti
ia tidak akan ada yang
tidak bisa hal pasti bisa nah
Hai deh sekian ya video kali ini nah
jangan lupa saya happy
hai
Voir Plus de Vidéos Connexes
Cara Membuat Database dan Tabel MySQL pada phpMyAdmin
view data codeigniter v3
Generate C# Model from existing Microsoft SQL Server Database
Complete CRUD Operation in Asp.Net C# With SQL Server Step by Step
PHP For Beginners, Ep 3 - Your First PHP Tag
Part3 : Database Testing | How To Test Schema of Database Table | Test Cases
5.0 / 5 (0 votes)