Yuav Ua Li Cas Dhau Qhov Ntsuas Ntawm Ib Daim Ntawv

Cov txheej txheem:

Yuav Ua Li Cas Dhau Qhov Ntsuas Ntawm Ib Daim Ntawv
Yuav Ua Li Cas Dhau Qhov Ntsuas Ntawm Ib Daim Ntawv

Video: Yuav Ua Li Cas Dhau Qhov Ntsuas Ntawm Ib Daim Ntawv

Video: Yuav Ua Li Cas Dhau Qhov Ntsuas Ntawm Ib Daim Ntawv
Video: qhia yuav ua YouTube li cas 2024, Hlis ntuj nqeg
Anonim

Teeb tsa cov ntaub ntawv hloov xa ncaj qha nyob ntawm qhov tsis muaj qhov xav tau txav los ntawm ib daim ntawv tshwj xeeb. Lawv txoj kev hloov chaw tuaj yeem ua tiav siv ntau hom kev cai thiab cov ntawv sau.

Yuav ua li cas dhau qhov ntsuas ntawm ib daim ntawv
Yuav ua li cas dhau qhov ntsuas ntawm ib daim ntawv

Cov Lus Qhia

Kauj ruam 1

Sau ib daim ntawv HTML uas suav nrog txhua qhov xav tau ntawm daim foos no. Koj yuav dhau qhov kev npaj uas tau npaj rau tsab ntawv kom nws tuaj yeem ua nws. Hauv cov ntawv nyeem uas muaj txheej txheem, nco ntsoov xam cov ntsiab lus hom (ntawv nyeem, cov lus, thiab lwm yam), cov ntawv ncaj qha muaj nyob rau hauv ib daim teb tshwj xeeb, lo lus zais nkag teb chaw, ntau lub xov tooj cua khawm, "Daim ntawv ntshiab" hais kom ua.

Kauj ruam 2

Nyem Xa Daim Ntawv. Lub sijhawm no, koj lub browser yuav hloov lub ciaj tsim rau tsab ntawv. Tam sim no txheej txheem lawv nrog PHP. Txhawm rau rov ua dua tus nqi ntawm cov ntawv sau, ib tus password thiab daim ntawv sau hauv cov ntawv sau, sau: ncha $ _POST ['textfield lossis pswfield lossis textarea']. Rau tshuav ntawm cov kev txwv, kuaj xyuas lawv qhov muaj peev xwm hauv qhov kev thov. Txhawm rau ua qhov no, siv "tso tawm ()" muaj nuj nqi.

Kauj ruam 3

Yog tias ib qho parameter muaj ntau qhov txiaj ntsig, dhau nws cov nqi raws li ib qho kev ntsuas, ceeb toom PHP txog nws ua ntej. Hauv qhov no, nws tsis tas yuav paub txog cov naj npawb ntawm cov sau no. Nws yog txaus kom tso nkhaus nkhaus. Ua cov txheej txheem ntawm kab siv siv foreach.

Kauj ruam 4

Txhawm rau hloov cov ntaub ntawv los ntawm ib daim ntawv uas muaj cov ntxhuav thiab tuaj yeem hloov kho cov ntaub ntawv, txoj nyem rau ntawm lub rooj. Nyem rau "Qhib" kab. Nkag mus rau seem "Xaiv" los tsim qauv ntaub ntawv tshiab. Sau lub npe ntawm qhov khoom lossis txuas hauv qhov chaw tsim nyog "Ntxig".

Kauj ruam 5

Teeb lo lus txib "Tau Txais Daim Ntawv" thiab sau lub npe dav dav "Daim Ntawv" lossis "Daim Ntawv". Paub meej tias qhib ntawm tsim tsim nyog xav tau thiab hloov seem ntawm tabular rau daim foos no. Tam sim no, thaum twg koj nyem rau ntawm "Qhib" khawm, ib daim ntawv foos hais plaub nrog ib ntu tabular ntawm cov ntawv uas cov ntaub ntawv hloov pauv yuav tshwm.

Pom zoo: