neo Posted April 12, 2005 Report Share Posted April 12, 2005 Forma piemeeram ar 25 teksta laukiem. Es gribu izfiltreet katru POST mainiigo ar strip_tags() funkciju. Katram mainiigam rakstiit strip_tags($_POST['kautkas1']); ir paaraak gari. Varbuut ar ciklu, bet iisti nezinu kaa. Link to comment Share on other sites More sharing options...
Roze Posted April 12, 2005 Report Share Posted April 12, 2005 foreach($_POST as $k => $v) { $_POST[$k] = strip_tags($v); } aatri un netiiri .. Link to comment Share on other sites More sharing options...
v3rb0 Posted April 12, 2005 Report Share Posted April 12, 2005 (edited) Forma piemeeram ar 25 teksta laukiem. Es gribu izfiltreet katru POST mainiigo ar strip_tags() funkciju. Katram mainiigam rakstiit strip_tags($_POST['kautkas1']); ir paaraak gari. Varbuut ar ciklu, bet iisti nezinu kaa. 16240[/snapback] viens no variantiem būtu šitā kaut kā foreach ($_POST as $key => $value) { strip_tags($_POST[$key] ) vai strip_tags($value) } upd: un kas pa supportu, veselas divas atbildes 1min laikaa :D Edited April 12, 2005 by v3rb0 Link to comment Share on other sites More sharing options...
Venom Posted April 13, 2005 Report Share Posted April 13, 2005 /me lieto šādu te: //incoming superglobals data is slashed, we don't want that if (get_magic_quotes_gpc()) { function sslash(&$item) { if(is_array($item)) array_walk($item,'sslash'); else $item=stripslashes($item); } array_walk($_GET,'sslash'); array_walk($_POST,'sslash'); array_walk($_COOKIE,'sslash'); } ja ir pārliecība, ka nebūs apakšindeksu masīvu - tad array_walk($_POST,'strip_tags'); līdz ar to uzskatīsim tēmu par slēgtu Link to comment Share on other sites More sharing options...
Recommended Posts