DASAR-DASAR PHP

Dasar-dasar PHP

A. Pengenalan PHP
PHP adalah bahasa scripting yang menyatu dengan HTML dan dijalankan pada server side. Artinya semua sintaks yang kita berikan akan sepenuhnya dijalankan pada server sedangkan yang dikirimkan ke browser hanya hasilnya saja.
Latihan 1
Buka Macromedia Dreamweaver à Pilih Create New PHP à Pilih pada tab Code, kemudian tambahkan script berikut setelah tag
printf(“Mulai Belajar PHP”);
?>
printf digunakan untuk menampilkan pernyataan yang ada di antara “ ”, selain printf dapat juga menggunakan echo maupun die.
Simpan dengan nama lat1.php pada htdocs dan pada folder anda. Setiap penyimpanan harus pada folder htdocs. Hasil pada browser anda :
Karena pemrosesan kode PHP berada pada sisi server maka klien tidak dapat melihat kode PHP yang sesungguhnya. Untuk membuktikannya coba anda pilih menu View à Source pada Internet Explorer, anda akan melihat kode seperti berikut:
Perhatikan kode yang tertampil berbeda dengan kode PHP aslinya.
B. Variable
Dalam PHP setiap nama variable diawali tanda dollar ($). Misalnya nama variable a dalam PHP ditulis dengan $a. Jenis suatu variable ditentukan pada saat jalannya program dan tergantung pada konteks yang digunakan.
Latihan 2
Pada kode diatas a, b dan hasil adalah nama variabel yang digunakan untuk menyimpan nilai dari variabel tersebut, printf digunakan untuk menampilkan ke browser anda.
Simpan dengan nama lat2.php pada folder anda yang ada pada htdocs.
Hasilnya :
Latihan 3
Pada kode diatas nama merupakan nama variabel yang digunakan untuk menyimpan string “Manajemen Sistem Informasi”, printf digunakan untuk menampilkan tulisan Selamat Datang, diikuti dengan nilai yang terletak disebelah kanan koma, yaitu isi variabel nama. Tanda %s merupakan tanda format untuk string (artinya, data yang akan mensubstitusi tanda tersebut adalah data string).
Hasilnya :
Latihan 4
Buat file baru, Masuk pada tab document window design.
Pilih Insert à Form à Form
Pada properti tambahkan menjadi :
Form name adalah nama dari form yang anda buat, Action adalah nama file yang akan dijalankan ketika anda menekan tombol Submit, sedangkan Method adalah metode yang digunakan untuk mengirim variabel selain GET ada juga method POST
Tambahkan text pada form yang baru anda buat
Pilih Insert à Form à Textfield
Kemudian muncul window
Pilih No label tag dan Before from item, klik OK
Pada properti ubah menjadi:
TextField adalah nama variabel, jadi jika ada yang memasukkan ke textfield tersebut akan disimpan pada variabel nama_user.
Pilih Insert à Form à Button
Pada properti ubah menjadi :
Setelah selesai simpan dengan nama lat4.php
Kemudian buat file baru lagi, masuk ke document window tab code
Pada baris 10, $HTTP_GET_VARS[nama_user] digunakan untuk mendapatkan isi variabel nama_user yang kemudian disimpan dalam variabel $nama.
Pada baris 11, menampilkan tulisan dan isi variabel nama.
Hasilnya:
Setelah klik tombol Kirim, anda akan melihat tampilan sbb:
Tugas
Buatlah halaman web yang dapat menerima lebih dari satu masukan data.
C. Operator Pembanding dan Logika
Operator pembanding adalah operator yang digunakan untuk melakukan pembandingan dua buah operand dan menghasilkan nilai benar dan salah. Yang termasuk dalam operator pembanding adalah :
Operator
Makna
==
Sama dengan
<
Kurang dari
>
Lebih dari
<=
Kurang dari atau sama dengan
>=
Lebih dari atau sama dengan
!=
Tidak sama dengan
<>
Tidak sama dengan

Operator Logika biasa digunakan untuk menggabungkan kondisi berganda dan menghasilkan sebuah ekspresi bernilai salah (nilai 0) atau benar (nilai 1). Yang tergolong operator ini adalah :
v and atau &&
v or atau
v xor
v !
Latihan 5
Simpan dengan nama lat5.php
Hasilnya :
Contoh
Hasilnya :
Tugas
Buatlah halaman web untuk mengkonversi rupiah ke dollar dan rupiah berupa masukkan data.

JENIS-JENIS KOMPUTER

JENIS-JENIS KOMPUTER
Jenis Komputer Berdasarkan Prosesor
Berdasarkan prosesornya, komputer digolongkan ke dalam tiga bagian, yaitu
a. Mainframe
adalah komputer yang prosesornya mempunyai kemampuan sangat besar, karena ditujukan untuk banyak pemakai.
b. Minicomputer
sebenarnya adalah bentuk mini dari komputer mainframe.
c. Personal Computer (PC) atau komputer pribadi
adalah komputer yang ditujukan untuk satu pemakai dengan satu pemakain program aplikasi pada suatu saat.

Jenis Komputer Berdasarkan Bentuk dan Ukuran Fisik
a. Tower (menara
b. Desktop (meja)

c. Portable
d. Notebook (buku catatan)
Notebook mempunyai ukuran yang sama dengan kerta kuarto, yaitu 8 ½ x 11 inci, tebalnya berkisar 1hinggan 1 ½ inci dan beratnya antara 4 sampai 6 kg.

e. Subnotebook
adalah komputer yang ukuran ada diantara komputer notebook dan palmtop.

f. Palmtop
adalah komputer yang dapat digenggam, karena ukurannya yang sangatkecil sering disebut handheld computer
Komputer Berdasarkan Jenis Data yang Diolah
Berdasarkan pada data yang diolahnya, komputer dapat dibagai atas tiga bagian,
yaitu ;
a. Komputer Analog
Digunakan untuk mengolah data kualitatif, bekerja secara kontinu dan parallel, biasanya tidak memerlukan bahasa perantara.
Contohnya komputer yang digunakan dirumah sakit untuk mengukur suhu, kecepatan suara, voltase listrik dll.


b. Komputer Digital
Digunakan untuk mengolah data kuantitatif (huruf, angka, kombinasi huruf & angka, karakter-karakter khusus) biasanya memerlukan bahasa perantara. Contohnya komputer PC dll.
c. Komputer Hybrid,
Merupakan kombinasi antara komputer analog dengan digital.
Contohnya Facsimile.

Articles Computer Hardware

Articles Computer Hardware
Component-Computer Components
Beep:
Beep computer speakers issued on the post or when the error / gangguang certain. Voters who appear through computer speakers, generally indicates an error in the program is running. Beep can be added in the program created by inserting a code ASCII 7.

BIOS:
Basic Input Output System. Software installed on a computer chip to manage the basic operations such as screen, hard disk, memory, VGA, etc.. Part of the operating system that can identify a set of programs used to boot the computer, before putting the system disk. BIOS is available in ROM (Read Only Memory) from the system and generally stored permanently. Programs that used to turn on the computer microprocessor. BIOS also manage the flow of data between the computer and operating system enhancements that are connected to the computer.

Booting:
The process turned the computer.

Bootable CD:
CDs that can be used for booting

Bus:
Channel, which consists of a set point that sejenis.Sekumpulan cable is a transportation information to all the equipment in the system. Information can be data, command or address.

Cache Memory:
High-speed memory that is able to work with the CPU, act as a buffer between the CPU and main memory is slow.

Chassis:
Box engine computer (the motherboard and supporters, power supply, disk drives, hard disk, CD ROMdrive). Platform or place to protect the motherboard, the control board, power supply and disk drive components-kompenen other. A case was no more than an order from the computer. This is a case where the components of a computer system is located, is also to place cooler (cooling fan), and also to ground electricity that are on the components of the framework is made of iron. Case the place with a large expansion that many preferred, with the expansion of space that you can add more devices other easily. Examples of devices that can be added is, for example, a DVD drive, a CD writer, and others. Currently, the prime minister to form the tower is usually preferred in the case of a desktop form because it has a more extensive expansion to, and can also have the ability to better cooling. A case can be at or atx, where the difference lies in the position of the motherboard later, as power supply that came with the case. Case computers usually come with the power supply, although sometimes it is suggested that you buy a separate powersupply that can get both quality barangtersebut with the same high.

CD ROM Drive: CD ROM tool player. A drive for recording or play the Compact Disc, which is often found adalahCD-ROM (CD Read Only Memory) MO (Magneto-Optical) and worms (Write Once Read Many).

CGA:
Color Graphics Adapter. One type of monitor, the IBM standard for quality low-resolution monitors, in graphic mode can only display the 4 colors.

Clock:
Hours / pewaktu. Series of frequency generator. The main source of credits electronic computer. Clocks used for making the operation of all elements of the computer.

CMOS:
Compelementary metal oxide semiconductor. RAM size of a small 64-byte save the BIOS settings when the computer is turned off. CMOS technology is an extension of the MOS IC yield to the needs of low battery power. CMOSdigunakan to save the configuration program, the program diagnostic information and the date and time of making the files that will not disappear even if the computer is turned off.

Com:
Communications of acronym or often called a serial port, which is the component that connects the CPU with printers, modems and other equipment.

CPU:
Central Processing Unit. The main processing unit in terms of technique called the microprocessor, is the general understanding of the machine is the computer chassis with all the contents inside. Central processing of entries that generate output. Included here are all the registers, the circuit aritmatik, a unit comparison, etc..

CRT:
Catoda Ray Tube technology used to create system display / computer monitors use cathode ray tube.

Disk:
A data storage media. The definition of the disk is a hard drive or floppy disk. While the floppy disk is a floppy diskette. The thin plate coated magnetic materials (iron oxide) that is able to save some data or information. Reading and writing information concentrated on the track.

Disk Boot:
Floppy disk that can be used for booting the computer

Disk cleaner:
Liquids used to clean the head on diskdrive

Disk defragmenter:
The tool used to adjust the structure or layout of the file so that it will reduce the fragmentation of a hard disk space.

DRAM:
Dynamic RAM. Memory PC ditulisi.Untuk can read and store data in memory, the contents need to direfresh periodically. This type of memory used in the main memory used for routine process.

Drive:
Door, the disk drive.

Driver:
Software, which makes the operating system to communicate with the peripherals of bias or other means, for example, the mouse driver to control the mouse.

EGA:
Enhanced Graphics Adapter. One of the standard resolution monitor. EGA capable of displaying 16 colors in the model graph, at the monitors CGA.Monitor above the EGA card capable of displaying 16 colors in the form of text (80 characters x 25 or 40 x 25karakter), 16 colors in the form of low-resolution and high resolution 4warna on display and 640 x 350titik graph. Development of the EGA are the type of ATI Technologies Inc. with a card called EGA WONDER, can display 132 x 25 characters. Monitor of the EGA still plug the monitor with the same type of CGA monitor and didn't. EVEREX card issued EPGA (Proffesional Enhanced Graphics Adapter), capable of displaying 649 x 480 dot (dot) with 256 colors, from the 4096 combination of primary colors (pallette). EPGA and also called PEGA (Proffesional Enhanced Graphics Adapter), or the PGA (Proffesional Graphics Adapter), the screen displays text 132 x 43karakter on multi-frequency, or birthday syncing, and the flexibility that you can use the monitor and didn't enhanced monitor. Inimempergunakan monitor 9 pin connector, which consists of 2 lines.

Floopy drive / diskdrive:
is a component of the computer used to floopy drive or floppy disks as storage media data

GUI:
GUI (graphical User Interface) is the display menu with a computer program modegrafis.

Hard disk:
Media large data storage capacity.
Head:
Head, the end of the recorder, part of the disk drive or a function to read or write.

Host:
Workstation (computer users)

Installation:
Further, placement and configuration files that are required by the computer system.

IP Address:
Internet Protocol address is the name of a computer connected to the network in the form of certain rules.

Network Computers:
Relations between the computer one with the other computer to get the sharing of resources.

Linux Kernel:
The core of Linux, is a special code that is created for Linux, with the task management process, memory, hardware drivers, the drivers file system, and network management.

Keyboard:
Board key, keyboard.

Connector:
A peripheral used to connect one node to another node through the cable.

LAN:
Local Area Network

LAN Card:
Periperal a computer that is used to connect a computer to other computers.

LPT:
Line Printing Terminal or parallel port. Port for connecting a PC with a printer.

LSB:
Least Significan bits. The smallest unit of information in a binary number. One bit is enough to declare the difference between yes and no, up and down, on and off, one and zero. Computers must display the information in bits because of electronic circuits made only two circumstances, on or off. In a computer information arranged in 8 bit or 1 byte.

MPU:
Micro Processor Unit. Same with the CPU

Motherboard:
Board computer network where all electronic components terangkai computer.

Text mode:
Display the menu with a computer program written or text mode, usually executed with the command key keyboard

Open Source:
Computer software development project of the distribution of funds, which are free and include the original program code so that other people can be developed.

Paterrn:
Group data in one unit in the RAM memory, generally 1 byte = 8 bits.

PCI:
Peripheral Component Interconnect. Peripheral bus that commonly used on the PC, Macintosh and workstations. First designed by Intel and appear in the market padaakhir 1993. PCI provides faster data transfer path between the CPU components diPC other peripherals such as video, disk, network and others.

Peripheral:
Tools. Specifications support equipment yangdibutuhkan by a PC that can work optimally.

PIC:
Interupt Programmable Controller. Selaterprogram control. Chip that works to control the process of interpolation between peripherals. Tool sidelines of the peripherals that work to help the CPU in the process of interpolation.

POST:
Power-on Self Test is the test conducted by the PC to check the function of supporting components of the PC to work properly.

Power Supply:
A series of electronic function sebagaipencatu power / grantor source voltage / currents on the equipment.

Protocol:
Rules

RAM:
Random Access Memory, a memory that can be read and written. The information will be lost if the computer dies.

Reset:
Mengenolkan clear the memory or logic keluaran.Memulai from the beginning.

Scandisk:
is a tool used to check the structure of a file system

Setup:
Installing

Server:
Server is a central computer and provide facilities for other computers

Sharing:
the use of shared resources (peripheral dandata) contained in the computer in the network.

Operating System:
Operating system is a system that links between computer users with computer hardware.

Software:
Software, a computer application program

Source Code:
The source code that can be developed by the Users

Layout:
the picture layout components elektonika in the form of the face image with the exact same size.

Topology:
How to connect between computers.

Troubleshooting:
Solutions to problems that often occur

User friendly:
It is very easy for users

USB:
Universal Serial Bus. Socket found in all new models for PC connection USB devices. USB support the installation of the system with easy Plug and Play, and gradually replaced the serial port and pararel that long. USB devices include scanners, modems and printers.

UTP:
UTP (Unshielded Twisted Pair) is a pair of cables that dililit one another with the goal of reducing the electrical interference that there are from two, four or more pairs (usually used in the network is 4 pairs / 8 cable) with the method pengawatan

VRAM:
Video Random Access Memory (Video RAM) Type spesialdari DRAM, which allows direct access to high speed memory through the video circuit. The type of memory is more expensive than a conventional DRAM chips.