07 web course 2 php truyen nhan du lieu

  • Published on
    02-Jul-2015

  • View
    59.114

  • Download
    0

Embed Size (px)

Transcript

<ul><li> 1. Thit k &amp; Lp trnh Web 1i8PHP Truyn nhn d liu gia cc trang webKhoa CNTT H.KHTN</li></ul> <p> 2. Mn Thit k &amp; Lp trnh web 1 - PHP C bnNi dung C ch Truyn v Nhn d liu gia cc trang web Truyn/Nhn qua Phng thc GET Truyn/Nhn qua Phng thc POST Mt s v d 3. Mn Thit k &amp; Lp trnh web 1 - PHP C bnNi dung C ch Truyn v Nhn d liu gia cc trang web Truyn/Nhn qua Phng thc GET Truyn/Nhn qua Phng thc POST Mt s v d 4. Mn Thit k &amp; Lp trnh web 1 - PHP C bnC ch truyn nhn d liu www.example.com Webserver2Internet or IntranetYu cu trang b.php7 5. Mn Thit k &amp; Lp trnh web 1 - PHP C bnC ch truyn nhn d liu ? 6. Mn Thit k &amp; Lp trnh web 1 - PHP C bnC ch truyn nhn d liu www.example.comTextbox : txtDangnhap WebserverPassword Box: txtDangnhap2 txtDangnhap = phpAdmin Internet or Intranet txtDangnhap = admin 7 Yu cu trang xlDangnhap.php 7. Mn Thit k &amp; Lp trnh web 1 - PHP C bnC ch truyn nhn d liu Trang web nhp d liu : S dng i tng Nhp liu thng qua cc formfield Thc hin vic truyn d liu thng qua Submit Trang web nhn d liu (URL): S dng cc bin ton cc ca PHP $_POST[FieldName] $_GET[FieldName] $_REQUEST[FieldName] 8. Mn Thit k &amp; Lp trnh web 1 - PHP C bnC ch truyn nhn d liu Trang web nhp liu timSach.php Tm sch T kha : 9. Mn Thit k &amp; Lp trnh web 1 - PHP C bnC ch truyn nhn d liu Trang web nhp liu xltimSach.php Tm schT kha tm sch l : <br />Kt qu tm l : 10. Mn Thit k &amp; Lp trnh web 1 - PHP C bnC ch truyn nhn d liu Trang web nhp liu xuly.php T kha : 11. Mn Thit k &amp; Lp trnh web 1 - PHP C bnNi dung C ch Truyn v Nhn d liu gia cc trang web Truyn/Nhn qua Phng thc GET Truyn/Nhn qua Phng thc POST Mt s v d 12. Mn Thit k &amp; Lp trnh web 1 - PHP C bnTruyn/Nhn qua Phng thc GET Tham s truyn i qua a ch URL http://domain/pathfile?fieldname1=value1&amp;fieldname2=value2 V d: http://localhost/xuly.php?txtTukhoa=PHPHost Nhn d liu thng qua bin ton cc ca PHP $_GET[FieldName] $_REQUEST[FieldName] 13. Mn Thit k &amp; Lp trnh web 1 - PHP C bnPhng thc GET u khuyt im Khuyt im Khng thch hp truyn d liu c tnh bo mt (password) Dung lng D liu truyn i c gii hn URL submit bng phng thc GET c lu li trn server u im Ngi dng c th bookmark a ch URL Ngi dng c th Gi lp phng thc GET truyn d liu mkhng cn thng qua FORM 14. Mn Thit k &amp; Lp trnh web 1 - PHP C bnV d File: GET.HTMInput data<br />Xem chi tit 15. Mn Thit k &amp; Lp trnh web 1 - PHP C bnV d (tt)File: CHITIET.PHPInput data 16. Mn Thit k &amp; Lp trnh web 1 - PHP C bnNi dung C ch Truyn v Nhn d liu gia cc trang web Truyn/Nhn qua Phng thc GET Truyn/Nhn qua Phng thc POST Mt s v d 17. Mn Thit k &amp; Lp trnh web 1 - PHP C bnTruyn/Nhn qua Phng thc POST Tham s truyn i c n bn trong FORM Nhn d liu thng qua bin ton cc ca PHP $_POST[FieldName] $_REQUEST[FieldName] 18. Mn Thit k &amp; Lp trnh web 1 - PHP C bnPhng thc POST u khuyt im u im Bo mt hn phng thc GET Khng gii hn dung lng d liu truyn i Khuyt im Kt qu trang web tr v khng th bookmark C th gy ra li nu ngi dng mun quay li trang kt qu (nhnnt Back hoc Refresh) do b expired D liu c th khng truyn i c do vn v security 19. Mn Thit k &amp; Lp trnh web 1 - PHP C bnNi dung C ch Truyn v Nhn d liu gia cc trang web Truyn/Nhn qua Phng thc GET Truyn/Nhn qua Phng thc POST Mt s v d 20. Mn Thit k &amp; Lp trnh web 1 - PHP C bnTruyn/Nhn d liu t Checkbox File: Checkbox.php</p>