Saturday, September 25, 2010

Securing Extensions File

Inside folder, create an .htaccess file with this content:

   # Make all php code look like HTML
  AddType application/x-httpd-php .html .htm

After that create your html file. Inside the html file, you can write php code as if the html file is true php file. By this way, it doesn't care whatever the extension of the file. Whatever the file extension, it just to understand to treat the file as if that the file is true php file. You can use xml, html, boo, foo, po, irfan, or anything else. The syntax is the same as php file. Just the extension that different.
source: PHP Manual.

echo show_source(__FILE__);

establish the connections over SSL to encrypt client/server communications for increased security
or you can use ssh to encrypt the network connection between clients and the database server.
SSL/SSH protects data travelling from the client to the server, SSL/SSH does not protect the persistent data stored in a database. SSL is an on-the-wire protocol.

Mysql Syntaxs

To declare and automatically assign a variable outside of a procedure use:
mysql> select 45 into @a;
mysql> select @a;

To give a title of a result use:
mysql> select 45 'nilai';

Stored Procedure Example

This procedure just for assignment an "a" value to "b":

mysql> create procedure boo( in a int, out b int)
        > begin
        > select a into b;
        > end;
        > //

mysql> call boo(12, @c)//
mysql> select @c//