Writing with code highlighting in BlogSpot

It is the matter of good news that now you can write your codes with highlighting in blogspot also. Now it is more free for you and it is also available for you. Including PHP you may highlight other codes also from this.


Now without describing I am writing a PHP code here. 


Here we will run the code by which we can connect to a database through PHP. Code is bellow:

<?php

$conn_error = 'could not connect.'



$mysql_host = 'localhost';

$mysql_user = 'root';

$mysql_pass = '';



$mysql_db = 'a_database';



@mysql_connect($mysql_host, $mysql_user, $mysql_pass) or die($conn_error);

mysql_select_db('$mysql_db') or die($conn_error);



echo 'Connected!';

?>


Now try out a code for CSS.



A short code is bellow:

body {
    background-color: #d0e4fe;
}

h1 {
    color: orange;
    text-align: center;
}

p {
    font-family: "Times New Roman";
    font-size: 20px;
}



Thanks for your choice.

Related Posts
Previous
« Prev Post