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
/////////////ERROR REPORTING | |
ini_set('display_errors',1); | |
ini_set('display_startup_errors',1); | |
error_reporting(-1); | |
/////////////ERROR REPORTING |
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
$('element').fadeOut('slow',function(){$('this').remove();}); |
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
$date = date('Y-m-d H:i:s'); |
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
function grab_image($url,$saveto){ | |
$ch = curl_init ($url); | |
curl_setopt($ch, CURLOPT_HEADER, 0); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_BINARYTRANSFER,1); | |
$raw=curl_exec($ch); | |
curl_close ($ch); | |
if(file_exists($saveto)){ | |
unlink($saveto); | |
} |
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
$ch = curl_init($url); | |
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1); | |
$a = curl_exec($ch); | |
$youtubeJSON=json_decode($a,true); |
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
$.post('ajax/PAGE', postData, | |
function(data){ | |
}, | |
'json'); |
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
<div id="registerModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> | |
<div class="modal-header"> | |
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | |
<h3 id="myModalLabel">Modal header</h3> | |
</div> | |
<div class="modal-body"> | |
<p>One fine body…</p> | |
</div> | |
<div class="modal-footer"> | |
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button> |
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
$stmt = $db->prepare("UPDATE tablename SET tableRow = ?, tableRow2 = ? WHERE tableRow3 = ?"); | |
$stmt->execute(array($var1,$var2,$var3)); | |
if($stmt->rowCount()>0){ | |
} |
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
$stmt = $db->prepare("INSERT INTO tablename (var1, var2, var3) VALUES (?,?,?)"); | |
$stmt->execute(array($var1,$var2,$var3)); | |
if($stmt->rowCount()>0){ | |
} |
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
$stmt = $db->prepare('SELECT * FROM tablename WHERE colname = ?'); | |
$stmt->execute(array($variable)); | |
$results = $stmt->fetchAll(PDO::FETCH_ASSOC); | |
if($stmt->rowCount()>0){ | |
foreach($results as $result){ | |
} | |
} |
NewerOlder