Verify the last six digits of ID card php_PHP tutorial

WBOY
Release: 2016-07-13 10:51:46
Original
1588 people have browsed it




Verify the last six digits of ID card php

In the submission form, I have an item that requires me to submit the last six digits of my ID card. How should I write this? That is, the last six digits of the ID card are already in the file. Only if they are entered correctly can the next step be performed!

Thank you everyone, urgent! ! ! ! !

Let me answer




D8888D reply content------------------------------------------------- ----------
Just match the six digits after intercepting
For details, please refer to the string function in the manual

if(substr(fgets(fopen('idcard.txt', 'r')), -6) == $_POST['id_suffix']) {

echo 'match';

} else {

echo 'Does not match';

}


Copy code [ ]

D8888D reply content------------------------------------------------- ----------
It won’t be long before the two are the same

D8888D reply content------------------------------------------------- ----------
Actually, I didn’t explain it clearly. Haha, it’s been solved. Thank you everyone


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/632547.htmlTechArticleVerify the last six digits of the ID card. In the submission form, I have an item to submit the last six digits of the ID card. This requires How to write it? That is, the last six digits of the ID card are already in the file, and only it is entered...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!