I have a site written in PHP with sql code, what is the best way to upgrade my code to sqli? any training or tutorials? how to have clear PHP code?
mysql_connect("localhost","root","");
mysql_select_db("timer");
I have a site written in PHP with sql code, what is the best way to upgrade my code to sqli? any training or tutorials? how to have clear PHP code?
mysql_connect("localhost","root","");
mysql_select_db("timer");
The documentation touches that, to some extent, e.g. here. You can use the same function names, just prefixed with mysqli
instead of mysql
for the most part, apparently.
From there you should be able to swap out parts of your code with better constructs in mysqli
, e.g. parametrised statements instead of manually concatenating SQL.