Jump to content
php.lv forumi

Reģistrēšanās noteikumi


goma smile

Recommended Posts

Tādat kā jau title ir rakstīts man intrsē kā var pie reģistrācijas pievienot savus noteikumus takā :

 

1. piemēram user name var būt tikai A-Z & 0-9 simbolika

2. piemēram parole nedrīkst būt izsāka pa 4 simboliem .......

3. Parole jaatkārto 2 lodziņā.

4. piemēram E-mailam jābūt kā emailam ([email protected]) nevis (sadas.lvs.lv)

5. Pārbauda vai tāds lietotājvārds vai arī E-mails neeksistē.....

Edited by goma smile
Link to comment
Share on other sites

1. izmanto preg_match() funkciju ar regulāro izteiksmi /^[a-z0-9]+$/i

2. izmanto funkciju strlen()

3. izveido divus input elementus <input type="password" name="parole1"> un <input type="password" name="parole2">, pie datu saņemšanas pārbaudi, vai abi lodziņi tika aizpildīti vienādi.

4. līdzīgi kā 1. tikai sarežģītāka regulārā izteiksme

5. Pārbaudi savā DB vai atgriež 0, kad izpildi SELECT count(username) FROM usertable WHERE ussername='$username'

Link to comment
Share on other sites

E-mails eksistē, laikam 100% notiekt gruti, bet var domena dalu iegut un meginat nopingot vai ar file() konektet

Edited by cucumber
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...