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 | |
ini_set("auto_detect_line_endings", true); | |
$fileName = 'cases.csv'; | |
// set function for opening file | |
$file = fopen($fileName, "r+") or die("can't open file"); | |
// recognize file as csv, get it to loop | |
while(($data = fgetcsv($file, 1000, ',')) !== FALSE) { |
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 | |
/** | |
* Template Name: Custom database tables | |
* @package WordPress | |
* @subpackage Coraline | |
* @since Coraline 1.0 | |
*/ | |
coraline_set_full_content_width(); | |
get_header(); ?> |
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 | |
/** | |
* Template Name: Full-width, no sidebar | |
* @package WordPress | |
* @subpackage Coraline | |
* @since Coraline 1.0 | |
*/ | |
coraline_set_full_content_width(); | |
get_header(); ?> |
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>U.S. Citizen Claims Against Mexico to 1846: Case Listing</title> | |
</head> | |
<body> | |
<?php include("open_db.php"); | |
echo "<h1>U.S. Citizen Claims Against Mexico to 1846: Listing</h1> | |
<p>Below you will find the listing of claims against Mexico, date in which the claims were filed, and total amounts of the initial claim and final verdict. You can click to edit the claims, or to add new ones--or at least will be able to, once I figure out the whole forms thing.</p>"; |
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>U.S. Citizen Claims Against Mexico to 1846: Case Listing</title> | |
</head> | |
<body> | |
<?php include("open_db.php"); | |
echo "<h1>U.S. Citizen Claims Against Mexico to 1846: Listing</h1> | |
<p>Below you will find the listing of claims against Mexico, date in which the claims were filed, and total amounts of the initial claim and final verdict. You can click to edit the claims, or to add new ones--or at least will be able to, once I figure out the whole forms thing.</p>"; |
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 | |
/* | |
Allows the user to both create new records and edit existing records | |
*/ | |
// connect to the database | |
include("open_db.php"); | |
// creates the new/edit record form | |
// since this form is used multiple times in this file, I have made it a function that is easily reusable |
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 | |
$mysqli = new mysqli('[address of database]', '[username]', '[password]', '[database name]'); | |
// check connection | |
if (mysqli_connect_errno()) { | |
exit('Connect failed: '. mysqli_connect_error()); | |
} | |
?> |