Popular posts from this blog
How to create a virtual host in ubuntu?
When you are used to running your websites in windows envirnment, it can be a bit of pain to suddenly switch in to linux. This post will guide you towards setting up a virtual host in ubuntu. 1. Enable the virual host module and restart apache. sudo a2enmod vhost_alias sudo /etc/init.d/apache2 restart 2. Goto to /etc/apache2/sites-available directory and create a copy of the default file with the name of the virtual host you would like to create. In this case the virutal host is "my-first-host.com". cd /etc/apache2/sites-available/ sudo cp default my-first-host.com
SQL Injection and its prevention in PHP
What is SQL injection? SQL injection is one of the common attacks in web industry which uses SQL statements in the web form to execute a query in the wrong way and make attacks like making an unauthorised login or making wrong access to the data in the database. SQL injection usually occurs when users are asked for inputs through the HTML forms. Let us see a common example of SQL injection. Suppose we have a user login form that asks for their username and password. We use select statement for validating the username which is stored in the database.
Comments
Post a Comment