How to stop SQL injection through website URL in CodeIgniter?
Please follow the steps below:
- Access a webpage on the browser window.
- Type any special character after the link, and press enter.
- If the page loads as usual, then the page is not secured against SQL injection.
- Now open the file manager in cPanel, and go to the installation folder.
- Click open the config folder, located inside the application folder.
- Open the config.php file.
- Scroll down, and you can see all permitted characters.
- Allow only the alphabets, numeric, underscore and hyphen.
- View the web page again.
- The page does not load this time.
- This is the first line of defense for your website.