1. how to determine whether the time format is correct 2. how to determine the user's logon permission PHP
1. determine whether the time format is correct:
For example, I need a format like 20110603, which is filled by the user. how can I determine whether the user entered meets this specification,
Code references
2. how to determine user logon permissions:
For example, after a user logs on, copy an address path and set it to inaccessible to the user.
Hope you can give me some advice
Reply to discussion (solution)
Thank you! come and give me some advice ....
1. date controls can be used
2. you need to have a permission table to record the user ID and link. when the user accesses this link, determine whether the permission table has the corresponding user ID.
$ D = '000000'; if (date ('ymmd', strtotime ($ d) ==$ d) echo 'format is correct ';
If (! $ _ SERVER ['http _ referer']) die ('inaccessible ');