haardys Posted May 26, 2010 Report Share Posted May 26, 2010 Vai ir iespējā k-kādā veidā aizvākt iekopētu ENTER no input lauka? Respektīvi, kad aizpilda informāciju, un lietotājs kādā no input laukiem ir iekopējis tekstu, kurš satur ENTER, to ņemt un izdzēst? Cerams, ka kāds saprata domu! :D Link to comment Share on other sites More sharing options...
bubu Posted May 26, 2010 Report Share Posted May 26, 2010 $teksts = str_replace(array("\n", "\r"), "", $teksts); Link to comment Share on other sites More sharing options...
haardys Posted May 27, 2010 Author Report Share Posted May 27, 2010 $teksts = str_replace(array("\n", "\r"), "", $teksts); Paldies! ;) A kā var risināt problēmu, ka pie pēdiņām piemet slešu, t.i. ja ievada "ABC" tad iznākums \"ABC\" Link to comment Share on other sites More sharing options...
m8t Posted May 27, 2010 Report Share Posted May 27, 2010 stripslashes() Link to comment Share on other sites More sharing options...
indoom Posted May 27, 2010 Report Share Posted May 27, 2010 function removeSlashes($t='') { return function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc() ? stripslashes($t) : $t; } Link to comment Share on other sites More sharing options...
codez Posted May 27, 2010 Report Share Posted May 27, 2010 php.ini atslēdz magic_quotes_gpc ja uz hostinga tas nav pieejams, tad .htaccess failā: php_flag magic_quotes_gpc Off Link to comment Share on other sites More sharing options...
haardys Posted May 27, 2010 Author Report Share Posted May 27, 2010 php.ini atslēdz magic_quotes_gpc ja uz hostinga tas nav pieejams, tad .htaccess failā: php_flag magic_quotes_gpc Off man jau viņš ir OFF! Link to comment Share on other sites More sharing options...
briedis Posted May 27, 2010 Report Share Posted May 27, 2010 man jau viņš ir OFF! Nu tad skaties, vai pats kaut kur neizmanto addslashes. vai arī mysql_real_escape_string tur kur to nevajag darīt. Link to comment Share on other sites More sharing options...
Recommended Posts