Connect with us

Pay Per Code

Pay Per Code

MySQLi Escape – Procedural


MySQLi Escape – Procedural

Today, I had an issue with inserting a database item that had a single quote. Learning about real_escape_string in the past, I knew that was the function to use. Little did I know how effective this would be for future projects. So if you ever run into this issue in the future while using MySQLi, try using this snippet below. It helped me solve the problem I was facing! Leave comments below if you have any other methods or questions.

$yournewvariable  = mysqli_real_escape_string($con, $variable_name);


More in PHP

Instead of using ads, I am having you mine for crypto currency to support this site. Here are your stats:

You can start or stop at anytime but please wait for some accepted hashes before you do.


Popular Posts

To Top