Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Sheikh Hussnain hussnainsheikh

🎯
Focusing
View GitHub Profile
@hussnainsheikh
hussnainsheikh / tables_backup.php
Created Nov 6, 2017
Back up database tables.
View tables_backup.php
<?php
$dbhost = 'DB_Host'; // Database Host
$dbuser = 'DB_User'; // Database User
$dbpass = 'DBUser_Password'; // Database User Password
$db='DB_Name'; // Database Name
$i=0;
$conn = mysql_connect($dbhost, $dbuser, $dbpass);
mysql_select_db($db);
@hussnainsheikh
hussnainsheikh / Transfer_with_extraction.php
Last active Nov 6, 2017 — forked from musamamasood/transfer.php
Transfer files to server with publicly accessible zip file with extraction using PHP Copy and PHP ZipArchive. You just have to change the $remote_file_url and then upload this file on destination server and execute the file.
View Transfer_with_extraction.php
<?PHP
/**
* Transfer Files Server to Server using PHP Copy and PHP ZipArchive
* @link http://glowLogix.com
*/
/* Source File URL */
$remote_file_url = 'http://example.com/filename.zip';
/* New file name and path for this file */
@hussnainsheikh
hussnainsheikh / simple_calculator_using_jquery.html
Created Nov 2, 2017
Simple basic Calculator using jQuery. It includes addition, subtraction, multiplication and division. It also keep record of previous answers. Enjoy!
View simple_calculator_using_jquery.html
<!-- Basic calculator using jQuery -->
<html>
<head>
<title>Calculator</title>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<style type="text/css">
.field{
padding: 4px;
border-radius: 4px;
border: solid black 1px;
@hussnainsheikh
hussnainsheikh / simple_calculator.html
Created Oct 17, 2017
Simple basic Calculator using javaScript. Functions addition, subtraction, multiplication and division with maintaining history of previous answer.
View simple_calculator.html
<!-- Basic calculator using javaScript -->
<html>
<head>
<title>Calculator</title>
<style type="text/css">
.field{
padding: 4px;
border-radius: 4px;
border: solid black 1px;
margin: 3px;
@hussnainsheikh
hussnainsheikh / showtables.php
Created Sep 21, 2017
This is simple PHP script which shows all the tables of a database. You just need to provide database details. It can be helpful if we just have database details and do not know about the database tables.
View showtables.php
<?php
$db = 'database'; //Database name
$host = 'host'; //Hostname or Server ip
$user = 'database_user'; //Database user
$pass = 'password'; //Database user password
$con = mysql_connect($host,$user,$pass);
if($con){