yeahz Posted November 8, 2009 Report Share Posted November 8, 2009 1) Nespieciešams, lai ierakstot tekstu, tajā jābūt vismaz 2 latīņu burti; 2) Vajag noteikt vai tekstā ir tikai latīņu buri; 3) Errors: Notice: iconv() [function.iconv]: Detected an illegal character in input string in ... iconv("UTF-8", "ISO-8859-1//TRANSLIT", $title) Kāpēc viņš te izmet erroru? (ja ieraksta, piemēra, āīō vai م جيد لاختبا) Lūgšu problēmu risinājumus. Quote Link to comment Share on other sites More sharing options...
yeahz Posted November 9, 2009 Author Report Share Posted November 9, 2009 neviens? Quote Link to comment Share on other sites More sharing options...
PheliX Posted November 9, 2009 Report Share Posted November 9, 2009 if( preg_match( '/^[a-zA-Z]{2}$/', $teksts ) ){ // darīt ko jādara }else{ // nav kā vajag } Quote Link to comment Share on other sites More sharing options...
yeahz Posted November 10, 2009 Author Report Share Posted November 10, 2009 Nestrādā, ja ierakstu šādu tekstu "āāāāaā", nu pareizāk sakot neko nesaka un ieliek datus datubāzē. if (preg_match('/^[a-zA-Z]{2}$/', $_POST['username'])) Quote Link to comment Share on other sites More sharing options...
indoom Posted November 10, 2009 Report Share Posted November 10, 2009 (edited) 1) if (strlen(preg_replace('/[^a-z]/i','',$_POST['username'])) >= 2) { //irok } 2) if (!preg_match('/[^a-z]/i',$teksts)) { // tikai latīņu burti } Edited November 10, 2009 by indoom Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.