Skip to content

Tag: mysql

Escaping user input necessary if using json_encode?

If I take some input from a user in $_POST and json_encode it and put it in the query Is this prone to SQL injection? Does this input needs to be escaped? In my tests, I couldn’t run any queries with input like but I’m not even remotely good at this. PS – This is a test for learning. I&#8217…

Search returning no results in “reverse” order

I have a database filled with addresses. 6 columns (id, Name, Address, City, State, Zip, dt) My code is run with ajax for live search. Currently I can mostly find what I’m looking for with my queries. The problem I’m running into is this. If I search for “90210 Steve Jones” I get no re…

write in database (php/mySQL)

The problem is very simple (and everything, php and html is on one file(.php)) html part: the result is die(‘formulaire incomplet’);,and nothing is written in the database, i don’t see why. Any clue is welcome! thanks by advance Answer First, use the bound parameters method for all your data…