Make a div clickable javascript

You can make a div or li tag clickable using javascript


use following code

<div onclick="window.location.href='cc.html'">

Export and import mysql database for webhosting

phpmyadmin provides good interface to upload and download database .








All webhosting sites provides phpmyadmin to upload databases.

Here is interface to export database.It is very simple you can select database or tables to export














You can export database in following formats

1.
2.
3.
4.
5.
6.
7.  
8. 
9. 
10 .
Most commonly database is exported as sql

You can also download database in zipped or gzip format


For importing database browse the databse and save to server through import interface


Pass variables from one page to another

Here is a simple method to Pass variables from one page to another

Here is the code in first page

<a href="page2.php?nam=sree">click here</a>


In your second page you can access variable name as


$name=$_GET['nam'];
echo $name;

This code will display sree

Download files with php script example

Simple code for downloading files

Place this code in a php file and make links to it. That links will be act as download link for the file .





<?php
$filename="left.txt";

$type=filetype($filename);

header("Content-type: $type");
header("Content-Disposition: attachment;filename=$filename");
header("Content-Transfer-Encoding: binary");
header('Pragma: no-cache');
header('Expires: 0');
// Send the file contents.
set_time_limit(0);
//readfile($file);


 ?>