Easy WebDesign with Google Chrome

Google Chrome comes with excellent Developer's tool that has essential features. Many users may not observed it. Here i want to explain how to design a web page with Google Chrome's Developers tool. before that you should know how to use this tool and what all the things it can do:

Functionalities:

1. View code of a pericular element by a single click. along with css style information.

2. Excellent Javascript console, which is helpful for debugging

3. Javascript Error Highlighing

4. Resourse viewer

5. Modify Elements and view results in the page itself without reloading

To open this tool just Right Click on the perticular page and select 'Inspect Element' option, OR click 'Settings' Icon and goto Tools>Developer Tools. Here you can see different tabs such as Elements, resources, Network, Scripts, etc. Each section allows you to edit corresponding catagory items. In the elements section, you can edit the whole page.

To modify an element or html tag, just right click and select 'Edit as HTML' and make modufications. at the same time you can see results. You can also add CSS style codes to elements. It has it's own color picker that makes your task easy. after each modification is done, right click on it and copy the code and put it in your file.

Disabling PHP or MySQL Errors Display on Webpages

Showing Errors, Warnings, Notice, etc are very dangerous. because users (surfer) can reveal some secrets (like piece of php code, sql query, path of php file) and this may become helpful for the hackers to hack your site.They are required only when debugging.

Managing these error, warning, etc are very easy in php language. you can use the function error_reporting(). it takes following parameters:

ER_WARNING, ER_ERROR, ER_NOTICE,

By giving any one of the above will enable it. but we want to disable them. so we have to put a '~' symbol (NOT Operation) before them. You can manage multiple items by performing OR operation. The Examples are shown below:

// disable errors error_reporting(~ER_ERROR); // disable notice and warning error_reporting(~(ER_NOTICE | ER_WARNING));

MySQL: Adding Muliple Values Into Single Column in a Query

First we create a table: CREATE TABLE test_table(id INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(10), value VARCHAR(10)); If we want to add Some Values into "name" column only, then we can use this syntax: INSERT INTO test_table (name) values('name1'),('name2'),('namen'); The conclusion is : each values should be enclosed in seperate brackets, which are seperated by a comma.

In case of inserting into multiple columns, we can change it like this:

INESRT INTO test_table (name,value) values('name1','value1'),('name2','value2'),('namen','valuen');