<commit_before><?php


namespace Edu\Cnm\DdcAaaa;
use Edu\Cnm\DdcAaaa\{ Application };
require_once(dirname(__DIR__) . "/public_html/php/classes/autoload.php");
//require_once("/etc/apache2/capstone-mysql/encrypted-config.php");
$requestContent = file_get_contents("php://input");
$decodeContent = json_decode($requestContent, true);
$splitContent = explode(",", $requestContent);

$newApp = new Application(
	null,
	$decodeContent["46813104"]["first"], //first name
	$decodeContent["46813104"]["last"],//last name
	$decodeContent["46813105"], //email
	$decodeContent["46813106"],//phonenumber
	$decodeContent["46813107"],//source
	$decodeContent["46813110"],//about you
	$decodeContent["46813111"],//hopetoaccomplish
	$decodeContent["46813112"],//experience
	new \DateTime(),
	"empty",
	"empty",
	"empty3"
	//$decodeContent["Campaign Term"],
	//$decodeContent["Campaign Medium"],
	//$decodeContent["Campaign Source"]
);
//$newApp->insert($this->getPDO());
$decodeContentString = var_export($decodeContent, true);
//
//$fd = fopen("/tmp/apptest.txt", "w");
//fwrite($fd, $requestContent);
//fclose($fd);

$fd = fopen("/tmp/posttest.txt", "w");
fwrite($fd, $requestContent);
fclose($fd);
$fd = fopen("/tmp/posttest2.txt", "w");
fwrite($fd, $decodeContentString);
fclose($fd);
$fd = fopen("/tmp/jsonerror.txt", "w");
fwrite($fd, json_last_error_msg());
fclose($fd);<commit_msg>successfully puts data in DBA<commit_after><?php


namespace Edu\Cnm\DdcAaaa;
use Edu\Cnm\DdcAaaa\{ Application };
require_once(dirname(__DIR__) . "/public_html/php/classes/autoload.php");
require_once("/etc/apache2/capstone-mysql/encrypted-config.php");
$requestContent = file_get_contents("php://input");
$decodeContent = json_decode($requestContent, true);

$newApp = new Application(
	null,
	$decodeContent["46813104"]["first"], //first name
	$decodeContent["46813104"]["last"],//last name
	$decodeContent["46813105"], //email
	$decodeContent["46813106"],//phonenumber
	$decodeContent["46813107"],//source
	$decodeContent["46813110"],//about you
	$decodeContent["46813111"],//hopetoaccomplish
	$decodeContent["46813112"],//experience
	new \DateTime(),
	"empty",
	"empty",
	"empty3"
	//$decodeContent["Campaign Term"],
	//$decodeContent["Campaign Medium"],
	//$decodeContent["Campaign Source"]
);

	//grab the mySQL DataBase connection
//$config = readConfig("/etc/apache2/capstone-mysql/ddcaaaa.ini");
$pdo = connectToEncryptedMySQL("/etc/apache2/capstone-mysql/ddcaaaa.ini");
//$this->connection = $this->createDefaultDBConnection($pdo, $config["database"]);

$newApp->insert($pdo);
$decodeContentString = var_export($decodeContent, true);
//
//$fd = fopen("/tmp/apptest.txt", "w");
//fwrite($fd, $requestContent);
//fclose($fd);

$fd = fopen("/tmp/posttest.txt", "w");
fwrite($fd, var_export($pdo, true));
fclose($fd);
$fd = fopen("/tmp/posttest2.txt", "w");
fwrite($fd, $decodeContentString);
fclose($fd);
$fd = fopen("/tmp/jsonerror.txt", "w");
fwrite($fd, json_last_error_msg());
fclose($fd);
{'fraction_non_alphanumeric': 0.21438172043010753, 'fraction_numerical': 0.0456989247311828, 'mean_word_length': 6.772845953002611, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4091893', 'n_tokens_mistral': 1134, 'n_tokens_neox': 1047, 'n_words': 159}