A Pen by Ken Shoufer on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$dbhost = 'localhost'; | |
$dbuser = 'username'; | |
$dbpass = 'password'; | |
$dbname = 'databasename'; | |
$currentdir = dirname(__FILE__); | |
$backup_file = $currentdir . '/bkup_files/' . $dbname . date("Y-m-d-H-i-s") . '.sql'; | |
$command = "mysqldump --opt -h $dbhost -u $dbuser -p'$dbpass' $dbname > $backup_file"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$e = 'bob123@somewhere.com'; | |
$u = 'bob123'; | |
$p = 'password123'; | |
ob_start(); | |
include('output_page.php'); | |
$message = ob_get_contents(); | |
ob_end_clean(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>Tooltip Examples</title> | |
<link rel="stylesheet" type="text/css" href="tooltip.css" /> | |
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> | |
<script type="text/javascript" src="tooltip.js"></script> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (isset($_POST) && isset($_POST['submit'])) { | |
//echo "post data"; | |
} else { | |
unlink('data.json'); | |
} | |
if(isset($_POST['submit'])) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (isset($_POST) && isset($_POST['submit'])) { | |
//echo "post data"; | |
} else { | |
unlink('data.xml'); | |
$file = "data.xml"; | |
if($fp = fopen('data.xml', 'a+')) { | |
$string = '<?xml version="1.0"?>' . "\n" . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (isset($_POST) && isset($_POST['submit'])) { | |
//echo "post data"; | |
} else { | |
unlink('data.csv'); | |
} | |
if(isset($_POST['submit'])) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Paging Using PHP</title> | |
</head> | |
<body> | |
<?php | |
$dbhost = 'localhost'; | |
$dbuser = 'root'; | |
$dbpass = ''; | |
$rec_limit = 5; |
Example of a javascript callback.
A Pen by Ken Shoufer on CodePen.
This Ajax example communicates with an API on a remote server. The server data is in JSON format.
A Pen by Ken Shoufer on CodePen.
NewerOlder