Rezime problema je da prilikom upisa u bazu dobijem npr ovo:52e280903436473232 umesto ovo:R‐46G22. Sve se obrađuje kroz par funkcija i radi super dok nema crtice u tekstu.
function ocisti($text) {
$text = strip_tags($text);
$trans = array('"' => """, "'" => "'");
$text = strtr($text, $trans);
return $text; }
function text_index($text){
$trazi = array(""", "&", "<", ">", " ", "@");
$html_free = str_replace($trazi, "", $text);
$trazi = array(" ", "/", "\\", "'", "\"", "-", "_", "&", ",", ";", ":", ".", "&");
$rezultat = str_replace($trazi, "", $html_free);
return $rezultat; }
$osnova = $_POST["zahtev"]; // prosledim npr: R-46G22
$naziv2 = ocisti($osnova);
$naziv_p = text_index($naziv2);
echo $osnova." ".$naziv2." ".$naziv_p;
Da li je neko imao sličnu situaciju?