Showing posts with label PWL. Show all posts
Showing posts with label PWL. Show all posts

Saturday, October 4, 2014

Creating Databases with phpMyAdmin


"phpMyAdmin
is a free software written in the PHP programming language that is used to handle the administration of MySQL over the network Jembar Jagat (World Wide Web). MySQL phpMyAdmin supports a variety of operations, including (managing databases, tables, fields (fields), relations (relations), the index, the user (users), licenses (permissions), and others)" source: wikipedia.com

Here will be described the simple steps to create a database with phpmyadmin, first you need to prepare the following software you need to create a database with phpmyadmin:
a. xampp or wamp
b. phpmyadmin
c. a web browser
After all the above software installed on your computer follow these steps:

1. activate the xampp control panel



2. Entry php my admin by typing "localhost/phpmyadmin" in browser address bar, then phpmyadmin will Appear on your webbrowser



4. Select sql menu, type the following command

5. click go
6.import



7. succes import


8. successfully created a data base

for how to fill in the data base I will discuss in my next article, thank you for reading my article may be useful!!

Monday, November 25, 2013

membuat database dengan phpmyadmin

1. aktifkan xampp control panel
2. masuk php my admin
dengan cara mengetik localhost/phpmyadmin pada address bar browser


3. muncul tampilan phpmyadmin
4.pilih menu sql, ketikan perintah berikut
5. klik go
6.import
7. sukses import




pembuatan dan pemanggilan function php

1. pembuatan function php
struktur

function namafungsi(variabel)
{
pernyataan;
}

contoh:


2. pemanggilan function php
cara memanggil function(fungsi) yang telah dibuat yaitu dengan cara mengetikan
namafungsi (variabel);



Monday, November 18, 2013

mengubah lokasi dokumen root pada xampp

1. Edit File httpd-vhosts.conf yang ada di folder installasi XAMPP anda, contoh :
X:\<path to your xampp installation>\apache\conf\extra\httpd-vhosts.conf
2. Hapus komentar yang ada di line 19, contoh
#NameVirtualHost *:80 menjadi NameVirtualHost *:80
3. Tuliskan kode berikut ini untuk menentukan lokasi baru dari folder yang akan diakses, (alternatif untuk folder htdocs)
1<VirtualHost *:80>
2    ServerAdmin webmaster@localhost
3    DocumentRoot F:\Develop\web\My personal web
4    ServerName testproject
5
6    <Directory "F:\Develop\web\My personal web">
7        Options Indexes FollowSymLinks Includes ExecCGI
8        AllowOverride All
9        Order allow,deny
10        Allow from all
11    </Directory>
12</VirtualHost>



4. Terakhir tambahkan nama domain baru dengan mengedit file hosts yang berlokasi di bawah ini: (Gunakan editor kesukaan kamu).
C:\WINDOWS\system32\drivers\etc
C:\WINDOWS\system32\drivers\etc\hosts
Jadi kira-kira isinya akan seperti ini
127.0.0.1       localhost
127.0.0.1       www.2nd-lights.com


sekarang ada dua nama domain, localhost dan  www.2nd-lights.com
5. Selesai….
Untuk mencoba silahkan buat file index.php, lalu letakan di F:\Develop\web\My personal web, lalu akses di browser dengan menulis http://www.2nd-lights.com

Monday, September 30, 2013

Belajar struktur dasar PHP

Tahukah Anda,  apa itu PHP ?
a. PHP Merupakan singkatan recursive dari PHP : Hypertext Prepocessor
b. Pertama kali dibuat oleh Rasmus Lerdorf pada tahun 1994.
c. Harus ditulis di antara tag :

<? dan ?>
 <?php dan ?>
<script language=”php”> dan </script>
<% dan %>

d. Setiap satu statement (perintah) biasanya diakhiri dengan titik-koma (;)
e. CASE SENSITIVE untuk nama identifier yang dibuat oleh user (berupa variable, konstanta, fungsi dll), namun TIDAK CASE SENSITIVE untuk identifier built-in dari PHP. Jadi :
* $nama ≠ $Nama ≠ $NAMA
* hitungLuas() ≠ HitungLuas()
* echo = ECHO
* while = WHILEMudah dipelajari.
Say Hello to PHP
Ketikkan perintah di bawah ini di editor :
Program 2.1
Nama File : hello.php
Deskripsi : Program sederhana menampilkan sebuah string di layar.

<?php
echo "Hello, My Name ARI DWI YUDA PRAWIRA ";
?>


hello.php

Simpan dengan nama “hello.php” di document-root komputer Anda.
Buka browser dan ketikkan alamat http://localhost/hello.php
Lihat hasilnya di browser. Akan terlihat tampilan seperti pada gambar Dibawah ini

localhost/hello.php


- Variabel
Digunakan untuk menyimpan sebuah value, data atau informasi
Nama variabel diawali dengan tanda $
Panjang tidak terbatas
Setelah tanda $ diawali oleh huruf atau under-scrore (_). Karakter berikutnya bisa terdiri dari huruf, angka, dan karakter tertentu yang diperbolehkan (karakter ASCII dari 127-255).
Bersifat case-sensitive.
Tidak perlu dideklarasikan.
Tidak boleh mengandung spasi.
Contoh :
Benar
- $_name
- $first_name
- $name3
- $name_3
               
Salah
- $3name
- $name?
- $first+name
- $first.name
- $first name

Program 2.2
Nama File : variabel.php
Deskripsi : Program mengisi dan menampilkan variabel di layar.
<?php
$nim = "12.12.6822";
$nama = 'ARI DWI YUDA PRAWIRA';
echo "NIM : " . $nim . "<br>";
echo "Nama : $nama";
?>

maka hasilnya di web browser ketika mengakses localhost/nim.php akan seperti gambar berikut

localhost/nim.php

demikian pengenalan struktur dasar php, semoga bermanfaat...