MārisL Posted December 24, 2007 Report Share Posted December 24, 2007 // Pārbaudam vai ir ievadīta derīga e-pasta adrese elseif(!preg_match("/^([a-zA-Z0-9])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+/", $_POST['epasts'])) { echo "Lūdzu ievadiet derīgu e-pasta adresi.<br />"; } Man viņš neatļauj reģistrēt epastu kas ir test-test@test.lv Kā preg_match pievienot - Link to comment Share on other sites More sharing options...
john.brown Posted December 24, 2007 Report Share Posted December 24, 2007 !eregi("^[a-z][a-z|0-9|]*([_][a-z|0-9]+)*([.][a-z|0-9]+([_][a-z|0-9]+)*)?@[a-z][a-z|0-9|]*\.([a-z][a-z|0-9]*(\.[a-z][a-z|0-9]*)?)$",$_POST['epasts']) Link to comment Share on other sites More sharing options...
bubu Posted December 24, 2007 Report Share Posted December 24, 2007 Kāpēc aizliedzam e-pasta adresi ģļāžšķūņū@ŗūķīšī.lv ? Link to comment Share on other sites More sharing options...
Delfins Posted December 24, 2007 Report Share Posted December 24, 2007 Konkrēti atbildot uz jautājumu. tāpēc ka `-` nav atļauts. UN vispār, @ pārbaudes pregus var dafiga atrast googlē... to ir milzum daudz :) Link to comment Share on other sites More sharing options...
john.brown Posted December 24, 2007 Report Share Posted December 24, 2007 Droši vien tāpēc, ka neesam sastapuši tādu dabā :) Neesmu domājis par šo tēmu... Bet ja iedosi pregu, kas to atļauj, būsim visi priecīgi - laba ZS dāvana būs :D Link to comment Share on other sites More sharing options...
Kristabs Posted January 7, 2008 Report Share Posted January 7, 2008 john.brown, Tavā variantā neņem domeinus ar domu zīmi. Link to comment Share on other sites More sharing options...
Recommended Posts