$font_path_sig = 'files/Claston Script.ttf';
+$DOB = $_COOKIE['pDOB'];
+$SIGNED = date('Y-m-d');
-// County on Petition
-imagettftext($jpg_image, 50, 0, 220, 260, $black, $font_path, 'Baltimore');
-// OR
-// City Checkbox
-imagettftext($jpg_image, 50, 0, 115, 365, $black, $font_path, 'X');
+if ( $_COOKIE['pCOUNTY'] == 'Baltimore City'){
+ // City Checkbox
+ imagettftext($jpg_image, 50, 0, 115, 365, $black, $font_path, 'X');
+}else{
+ // County on Petition
+ imagettftext($jpg_image, 50, 0, 220, 260, $black, $font_path, str_replace('County','',$_COOKIE['pCOUNTY']) );
+}
-// Slot 1 on Petition
// name
-imagettftext($jpg_image, 50, 0, 350, 1070, $black, $font_path, 'Patrick Michael McGuire');
-// signed
-imagettftext($jpg_image, 50, 0, 400, 1270, $black, $font_path_sig, 'Patrick Michael McGuire');
+imagettftext($jpg_image, 50, 0, 350, 1070, $black, $font_path, $_COOKIE['pNAME']);
+
// address
-imagettftext($jpg_image, 50, 0, 400, 1300, $black, $font_path, '501 Spring Ave Lutherville 21093');
-// date of birth
-imagettftext($jpg_image, 50, 0, 1800, 1070, $black, $font_path, '02 09 1980');
+imagettftext($jpg_image, 50, 0, 400, 1300, $black, $font_path, $_COOKIE['pADDRESS']);
+// date of birth
+if($DOB != ''){
+ imagettftext($jpg_image, 50, 0, 1900, 1070, $black, $font_path, date('m d Y',strtotime($DOB)));
+}
// date signed
-imagettftext($jpg_image, 50, 0, 1800, 1200, $black, $font_path, '05 07 2020');
+imagettftext($jpg_image, 50, 0, 1900, 1200, $black, $font_path, date('m d Y',strtotime($SIGNED)));
+
+
+// name
+imagettftext($jpg_image, 40, 0, 100, 2880, $black, $font_path, $_COOKIE['pNAME']);
+// address
+imagettftext($jpg_image, 40, 0, 100, 2975, $black, $font_path, $_COOKIE['pADDRESS1']);
+// city state zip
+imagettftext($jpg_image, 40, 0, 100, 3065, $black, $font_path, $_COOKIE['pADDRESS2']);
+// phone
+imagettftext($jpg_image, 40, 0, 100, 3160, $black, $font_path, $_COOKIE['pPHONE']);
+// date signed
+imagettftext($jpg_image, 40, 0, 2150, 3150, $black, $font_path, date('m / d / y',strtotime($SIGNED)));
// Send Image to Browser