introduction to php part3

34
Introduction to PHP part3

Upload: fontaine-callum

Post on 03-Jan-2016

47 views

Category:

Documents


1 download

DESCRIPTION

Introduction to PHP part3. Outline. 動態網頁. 現在的網頁不單單只是單向的顯示網頁給使用者端 , 更可以和使用者作互動 Ex: Google 搜尋引擎 因此需要製作一個使用者介面讓使用者可以輸入的動作 使用 HTML 來設計一個輸入的介面 表單 (Form) Web server 必須也要有個相對應的程式可以處理使用者輸入的資料 , 並給予適當的回應. 瀏覽程式的網 頁表單. Web 伺服器. PHP 的表單處理. - PowerPoint PPT Presentation

TRANSCRIPT

  • Introduction to PHP part3

  • Outline

  • , Ex: GoogleHTML(Form)Web server,

  • PHP

    PHPPHPUser input dataPHPPHP

  • (Form), (Text), (Password), (Radio), (Check Box), :(Text Area)web server

  • (Form)GETPOSTGET255 ?1=&2=http://ip/get.php?a=1&b=2POSTphp

    GETPOSTserver, phpphpphpip

  • PHP (GET Method)serverperson.html,

    htmlGET, server, serverget.php, , get.php(person.htmlget.php)

  • submit, serverGET, get.php

  • get.php$_GET:formnameechoclientstrcmpfunction, 0

  • PHP (POST Method)servermessage.html,

    message.html

  • POST methodname=John message=Hello

  • message.php$_POSTPOSTdate(Y-m-d H:i:s), echo HTML

  • Outline

  • , ,

  • , ,

  • , , ,

    102-2222204-1111303-5555

    111/233211/241

  • , , DDL

  • (cont)(primary key)(foreigner key)(primary key): , ,

    102-2222204-1111303-5555

  • (foreigner key): ,

    102-2222204-1111303-5555

    111/233211/241

  • MySQLPHP, PHP+MySQLMySQL, phpMyAdminphp3MySQLWebMySQL

  • phpMyAdminhttp://ip/home/mysqlIPMySQL serverip address, , PHP serverIP

  • root, , root

  • , phpMyAdmin, Program Files\EasyPHP5.3.0\phpmyadminconfig.inc.php$cfg['Servers'][$i]['password']

  • Primary key, VarChar,

  • Designer,

  • ,

  • (SQL)Access, , SQL

  • PHP(), php?

    PHPMySQLHTML

  • : serverbookstore.html, Peh, php

  • 10 (), , , (50% bonus)

    ***