Nel tuo codice NON è presente alcuna chiamata a stipslashes ...

Inoltre il tuo codice è aperto ad attacchi di SQL Injection.