This file contains hidden or 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 jmo_screen_layout_columns($columns) { | |
$columns['dashboard'] = 2; | |
return $columns; | |
} | |
add_filter('screen_layout_columns', 'jmo_screen_layout_columns'); | |
function jmo_screen_layout_dashboard() { | |
return 2; |
This file contains hidden or 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 ( !class_exists( 'DB' ) ) { | |
class DB { | |
public function __construct($user, $password, $database, $host = 'localhost') { | |
$this->user = $user; | |
$this->password = $password; | |
$this->database = $database; | |
$this->host = $host; | |
} | |
protected function connect() { |
This file contains hidden or 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 | |
print_r($_POST); | |
?> | |
<form method="post"> | |
Car <input type="checkbox" name="stuff[car]" value="1" /> | |
Dog <input type="checkbox" name="stuff[dog]" value="1" /> | |
<input type="submit" value="Submit" /> | |
</form> |
This file contains hidden or 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 | |
error_reporting(E_ALL); | |
ini_set("display_errors", 1); | |
print_r($_FILES); | |
//What folder to save it in | |
$targetPath = "uploads/"; | |
$allowed_three = array('pdf', 'doc', 'JPG','log', 'txt', 'wpd', 'wps', 'jpg', 'png', 'PEG', 'PNG'); | |
$allowed_four = array('docx'); | |
This file contains hidden or 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 | |
// Be sure to input YOUR database details below | |
// Watch the associated videos here: https://www.youtube.com/playlist?list=PLLs69n7Q4dCx5_7ZwnxTymH8X0iRP_2vw | |
$db_user = 'DB USERNAME HERE'; | |
$db_pass = 'DB PASSWORD HERE'; | |
$db_name = 'DB NAME HERE'; | |
$db_host = 'localhost'; | |
$mysqli = new mysqli($db_host, $db_user, $db_pass, $db_name); |
This file contains hidden or 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 | |
// Be sure to input YOUR database details below | |
// Watch the associated videos here: https://www.youtube.com/playlist?list=PLLs69n7Q4dCx5_7ZwnxTymH8X0iRP_2vw | |
$db_user = 'DB USERNAME HERE'; | |
$db_pass = 'DB PASSWORD HERE'; | |
$db_name = 'DB NAME HERE'; | |
$db_host = 'localhost'; | |
//MySQLi |
This file contains hidden or 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 | |
// Be sure to input YOUR database details below | |
// Watch the associated videos here: https://www.youtube.com/playlist?list=PLLs69n7Q4dCx5_7ZwnxTymH8X0iRP_2vw | |
$db_user = 'DB USERNAME HERE'; | |
$db_pass = 'DB PASSWORD HERE'; | |
$db_name = 'DB NAME HERE'; | |
$db_host = 'localhost'; | |
// MySQLi |
This file contains hidden or 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 | |
// Be sure to input YOUR database details below | |
// Watch the associated videos here: https://www.youtube.com/playlist?list=PLLs69n7Q4dCx5_7ZwnxTymH8X0iRP_2vw | |
$db_user = 'DB USERNAME HERE'; | |
$db_pass = 'DB PASSWORD HERE'; | |
$db_name = 'DB NAME HERE'; | |
$db_host = 'localhost'; | |
$time = time(); |
This file contains hidden or 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 | |
// Be sure to input YOUR database details below | |
// Watch the associated videos here: https://www.youtube.com/playlist?list=PLLs69n7Q4dCx5_7ZwnxTymH8X0iRP_2vw | |
$db_user = 'DB USERNAME HERE'; | |
$db_pass = 'DB PASSWORD HERE'; | |
$db_name = 'DB NAME HERE'; | |
$db_host = 'localhost'; | |
$query = "UPDATE objects |
This file contains hidden or 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 | |
// Be sure to input YOUR database details below | |
// Watch the associated videos here: https://www.youtube.com/playlist?list=PLLs69n7Q4dCx5_7ZwnxTymH8X0iRP_2vw | |
$db_user = 'DB USERNAME HERE'; | |
$db_pass = 'DB PASSWORD HERE'; | |
$db_name = 'DB NAME HERE'; | |
$db_host = 'localhost'; | |
$query = "DELETE FROM objects |