Chrome Extension

Encode html special characters and real escape string in php

    $fullname = trim($_POST['name']);
    $fullname = htmlspecialchars($fullname);
    $fullname = $conn->real_escape_string($fullname);
We are a bunch of lazy programmers so we developed this chrome extension
search code from your favorite search engine
Install Now

If you want to encode a string in PHP which has HTML tags and special characters you can use htmlspecialchars() function and real_escape_string() function which will encode HTML tags and special characters. This will prevent XSS and SQL injection attack on your application.

Was this helpful?
Open Code Manager We are hiring