Posts

Showing posts from February, 2018

Encryption concept

Encryption is a process of hide original information. Only an authorized person can read the hidden information. Used for protecting information sent from one point to another especially over network. Plain-text is not encrypted information or the original text. Encryption key is a secret value applied to plain-text to encrypt information. Cipher-text is the result of encryption process or encrypted information. Same encryption key needed to reverse this process to get original text. The reverse process is called decryption. Example Let say we want to encrypt following message "hello world" . Assuming that we have a table that assign a decimal value for each characters, such as a = 1 , b=2 etc. and continues to capital letters. The table also has special characters like space which equal 0. (Please refer to ASCII table for actual representation of characters). By comparing our message and character integer table, the message is represented by following sequen

Online gallery using div instead of table for page layout

Our online gallery up until previous post, used tables for setting layout for our gallery pages. Tables are primarily designed for tabulating data, not to layout page content. To define layout we should be using div tag. Our home page code shown below is modified to use div. To use div we should first get familiarized with CSS. <html>                <head>                               <title>Gallery| Home</title>                                                            <link rel="stylesheet" type = "text/css" href = "style/style.css">                                             </head>                <body>                                                                              <div style="width:20%; float:left;">                                              <!-- this is left space-->                               </div>                              

Online gallery database

Image
In previous post, message sent by visitor does not get stored in database. To use database we need PHP to get the data, connect to database and save the data there in database. Database that we are going to use is MySQL. Easiest and quickest way too use PHP and MySQL is to install XAMPP. After install your XAMPP copy the gallery folder, into server htdoc folder. Now type localhost/gallery/home.html  URL in your browser. The browser should be able to open the gallery home page. Make sure you have started Apache and MySQL from XAMPP control panel. Before saving the message from visitor into database, we have to create a database first. To do that, go to  phpMyAdmin page and create a database called  gallery. After the database is created, create a table called messageTable . Below is the entity diagram that represent the table. Next, create a PHP file  in the gallery folder. Open notepad  and type the following code. Save the file as saveMessaageToDatabase.php and select

Adding style to gallery

This post continues from previous blog where we  created online gallery website. In this post, we will add style to our pages. For this we will be using cascading styling sheet or CSS for short. The CSS codes are written inside notepad. Write the code written below in blank notepad (don't copy and paste) and save it as style.css in gallery folder.  a{                color: white;                background-color:gray;                padding: 15px;                text-decoration: none; } a:hover{                background-color:blue; } Don't forget to link this style sheet to your page. In home.html file, we need specify path to style sheet. Use <link> tag like shown below. <head> <title>Gallery| Home</title> <link rel="stylesheet" type = "text/css" href = "style.css"> </head> the hyperlinks now looks like button, when you move mouse on top of each bu

building online gallery

Image
Purpose of this website is to showcase picture collections.  This website only contain static pages without any functionality. To concentrate on website building environment with readily available applications like notepad and browser. Before dive into coding, always do some sketches to design your website. A simple boxes with page name would be enough to give your overall idea. adding your website content and edit them is always easy to do with paper and pencil. Design comes handy when your project become big and complex.websites which contains static pages like home, about us and contact us. We add another page which is specific for this web site gallery. Once your design is ready, we can dive into coding. Create a folder in desktop and name it gallery , all files belongs to web site will be saved here. First thing we will do is write a template. Your home page will be template for other pages. All web pages consist of code HTML code: <html>       <head>

Popular posts from this blog

Drawing Simple Pie Chart

VB.net connecting to SQL Server

VB.net