ellie123

Ellie's Custom Thank You Page

Aug 22nd, 2014
340
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. // This function will run within each post array including multi-dimensional arrays
  3. function ExtendedAddslash(&$params)
  4. {
  5. foreach ($params as &$var) {
  6. // check if $var is an array. If yes, it will start another ExtendedAddslash() function to loop to each key inside.
  7. is_array($var) ? ExtendedAddslash($var) : $var=addslashes($var);
  8. unset($var);
  9. }
  10. }
  11.  
  12. // Initialize ExtendedAddslash() function for every $_POST variable
  13. ExtendedAddslash($_POST);
  14.  
  15. ?>
  16. <?php
  17. $submission_id=$_POST['submission_id'];
  18. $formID=$_POST['formID'];
  19. $ip=$_POST['ip'];
  20. $nameof=$_POST['nameof'];
  21. $unidf=$_POST['unidf'];
  22. $unioi=$_POST['unioi'];
  23. $uploadyour=$_POST['uploadyour'];
  24. $backimg=$_POST['backimg'];
  25. $mysterydiner=$_POST['mysterydiner'];
  26. $dineremail=$_POST['dineremail'];
  27. $dinerpaypal=$_POST['dinerpaypal'];
  28. $ihave=$_POST['ihave'];
  29. $stepcomplete288=$_POST['stepcomplete288'];
  30. $clickto284=$_POST['clickto284'];
  31. $dateof232=$_POST['dateof232'];
  32. $of215=$_POST['of215'];
  33. $clickto88=$_POST['clickto88'];
  34. $wouldyou89=$_POST['wouldyou89'];
  35. $wasthe90=$_POST['wasthe90'];
  36. $werewindows=$_POST['werewindows'];
  37. $wasthe=$_POST['wasthe'];
  38. $wereexternal200=$_POST['wereexternal200'];
  39. $wasthe94=$_POST['wasthe94'];
  40. $werethe=$_POST['werethe'];
  41. $isthere201=$_POST['isthere201'];
  42. $weremenu202=$_POST['weremenu202'];
  43. $isoutdoor=$_POST['isoutdoor'];
  44. $wereexternal=$_POST['wereexternal'];
  45. $wereoutside=$_POST['wereoutside'];
  46. $wasyour206=$_POST['wasyour206'];
  47. $wasthe207=$_POST['wasthe207'];
  48. $wouldyou96=$_POST['wouldyou96'];
  49. $plsenter23 = str_replace(",", "\n", $_POST['plsenter23']);
  50. $usingthe35=$_POST['usingthe35'];
  51. $isthere=$_POST['isthere'];
  52. $didthe98=$_POST['didthe98'];
  53. $didthe99=$_POST['didthe99'];
  54. $didyou208=$_POST['didyou208'];
  55. $wasyour100=$_POST['wasyour100'];
  56. $wereyou101=$_POST['wereyou101'];
  57. $wereyou165=$_POST['wereyou165'];
  58. $whilewaiting=$_POST['whilewaiting'];
  59. $isthe=$_POST['isthe'];
  60. $isthe168=$_POST['isthe168'];
  61. $doyou169=$_POST['doyou169'];
  62. $canyou=$_POST['canyou'];
  63. $wereyou170=$_POST['wereyou170'];
  64. $onceseated=$_POST['onceseated'];
  65. $wereyou=$_POST['wereyou'];
  66. $didyour173=$_POST['didyour173'];
  67. $didyour174=$_POST['didyour174'];
  68. $pleaseorder=$_POST['pleaseorder'];
  69. $didsomeone176=$_POST['didsomeone176'];
  70. $werethe177=$_POST['werethe177'];
  71. $wereyou178=$_POST['wereyou178'];
  72. $didyour=$_POST['didyour'];
  73. $didyour180=$_POST['didyour180'];
  74. $pleaseenter67=$_POST['pleaseenter67']['0'] .":". $_POST['pleaseenter67']['1'] ." ". $_POST['pleaseenter67']['2'];
  75. $pleaseenter=$_POST['pleaseenter']['0'] .":". $_POST['pleaseenter']['1'] ." ". $_POST['pleaseenter']['2'];
  76. $doyou293=$_POST['doyou293'];
  77. $doyou295=$_POST['doyou295'];
  78. $doyou297=$_POST['doyou297'];
  79. $wasthe181=$_POST['wasthe181'];
  80. $plsexplain=$_POST['plsexplain'];
  81. $werethe183=$_POST['werethe183'];
  82. $didyour182=$_POST['didyour182'];
  83. $didyou=$_POST['didyou'];
  84. $didyour185=$_POST['didyour185'];
  85. $whenordering123=$_POST['whenordering123'];
  86. $didyour186=$_POST['didyour186'];
  87. $didyou125=$_POST['didyou125'];
  88. $hasyour=$_POST['hasyour'];
  89. $pleaseenter83=$_POST['pleaseenter83']['0'] .":". $_POST['pleaseenter83']['1'] ." ". $_POST['pleaseenter83']['2'];
  90. $whatis=$_POST['whatis'];
  91. $pleaseenter84=$_POST['pleaseenter84']['0'] .":". $_POST['pleaseenter84']['1'] ." ". $_POST['pleaseenter84']['2'];
  92. $howwould151=$_POST['howwould151'];
  93. $wasyour=$_POST['wasyour'];
  94. $whatwas217 = str_replace(",", "\n", $_POST['whatwas217']);
  95. $doyou300=$_POST['doyou300'];
  96. $doyou303=$_POST['doyou303'];
  97. $doyou305=$_POST['doyou305'];
  98. $didthe=$_POST['didthe'];
  99. $didthe190=$_POST['didthe190'];
  100. $wasthe191=$_POST['wasthe191'];
  101. $didyour192=$_POST['didyour192'];
  102. $uponfinishing307=$_POST['uponfinishing307'];
  103. $hostesson223=$_POST['hostesson223'];
  104. $didyour194=$_POST['didyour194'];
  105. $onceyou195=$_POST['onceyou195'];
  106. $atthe=$_POST['atthe'];
  107. $didthe199=$_POST['didthe199'];
  108. $manageron=$_POST['manageron'];
  109. $barguy=$_POST['barguy'];
  110. $didyou213=$_POST['didyou213'];
  111. $pleasemark=$_POST['pleasemark'];
  112. $step2complete=$_POST['step2complete'];
  113. $didyou255=$_POST['didyou255']['0'];
  114. $basedon=$_POST['basedon'];
  115. $diningexperiencepositive=$_POST['diningexperiencepositive'];
  116. $explainbadexp=$_POST['explainbadexp'];
  117. $wasenoughservers=$_POST['wasenoughservers'];
  118. $writeorattachfinal=$_POST['writeorattachfinal'];
  119. $writefinal=$_POST['writefinal'];
  120. $anynotes=$_POST['anynotes'];
  121. $addfinalnotes=$_POST['addfinalnotes'];
  122. $step3complete=$_POST['step3complete'];
  123. $uploadsignaturediner=$_POST['uploadsignaturediner'];
  124. $propext1=$_POST['propext1'];
  125. $propext2=$_POST['propext2'];
  126. $propext3=$_POST['propext3'];
  127. $app1=$_POST['app1'];
  128. $app2=$_POST['app2'];
  129. $app3=$_POST['app3'];
  130. $meal1=$_POST['meal1'];
  131. $meal2=$_POST['meal2'];
  132. $meal3=$_POST['meal3'];
  133. $meal4=$_POST['meal4'];
  134. $finalupsummary=$_POST['finalupsummary'];
  135. $check1=$_POST['check1'];
  136. $creditcard=$_POST['creditcard'];
  137. //*THESE FIELDS BELOW ARE MY UPLOAD FIELDS - IF NO IMAGE IS UPLOADED THEN I WANT A DEFAULT IMAGE OF
  138. // http://mywordpressurlhere.net/wp-content/uploads/2014/08/defaultnonimage.png to be there instead *//
  139. $uploadpictures6=$_POST['uploadpictures6'];
  140. $uploadaddl=$_POST['uploadaddl'];
  141. $uploada91=$_POST['uploada91'];
  142. $ifyou=$_POST['ifyou'];
  143. $photoapp1=$_POST['photoapp1'];
  144. $photoapp2=$_POST['photoapp2'];
  145. $photoapp296=$_POST['photoapp296'];
  146. $photomeal1=$_POST['photomeal1'];
  147. $photomeal2=$_POST['photomeal2'];
  148. $photomeal3=$_POST['photomeal3'];
  149. $photomeal4=$_POST['photomeal4'];
  150. $uploadfinal=$_POST['uploadfinal'];
  151. $picofcheck=$_POST['picofcheck'];
  152. $picofccreceipt=$_POST['picofccreceipt'];
  153.  
  154. ?>
  155.  
  156. <?php
  157. $db_host = 'localhost';
  158. $db_username = 'ellie123_wrdp23';
  159. $db_password = 'xxxxxxxxxxxxx';
  160. $db_name = 'ellie123_wrdp23';
  161. mysql_connect( $db_host, $db_username, $db_password) or die(mysql_error());
  162. mysql_select_db($db_name);
  163. ?>
  164. <?php
  165.  
  166. // search submission ID
  167.  
  168. $query = "SELECT * FROM dinerform WHERE submission_id = '$submission_id'";
  169. $sqlsearch = mysql_query($query);
  170. $resultcount = mysql_numrows($sqlsearch);
  171.  
  172. if ($resultcount > 0) {
  173. $updateStr = "UPDATE dinerform SET ";
  174. $updateStr = $updateStr."nameof='$nameof',";
  175. $updateStr = $updateStr."unidf='$unidf',";
  176. $updateStr = $updateStr."unioi='$unioi',";
  177. $updateStr = $updateStr."uploadyour='$uploadyour',";
  178. $updateStr = $updateStr."backimg='$backimg',";
  179. $updateStr = $updateStr."mysterydiner='$mysterydiner',";
  180. $updateStr = $updateStr."dineremail='$dineremail',";
  181. $updateStr = $updateStr."dinerpaypal='$dinerpaypal',";
  182. $updateStr = $updateStr."ihave='$ihave',";
  183. $updateStr = $updateStr."stepcomplete288='$stepcomplete288',";
  184. $updateStr = $updateStr."clickto284='$clickto284',";
  185. $updateStr = $updateStr."dateof232='$dateof232',";
  186. $updateStr = $updateStr."of215='$of215',";
  187. $updateStr = $updateStr."clickto88='$clickto88',";
  188. $updateStr = $updateStr."wouldyou89='$wouldyou89',";
  189. $updateStr = $updateStr."wasthe90='$wasthe90',";
  190. $updateStr = $updateStr."werewindows='$werewindows',";
  191. $updateStr = $updateStr."wasthe='$wasthe',";
  192. $updateStr = $updateStr."wereexternal200='$wereexternal200',";
  193. $updateStr = $updateStr."wasthe94='$wasthe94',";
  194. $updateStr = $updateStr."werethe='$werethe',";
  195. $updateStr = $updateStr."isthere201='$isthere201',";
  196. $updateStr = $updateStr."weremenu202='$weremenu202',";
  197. $updateStr = $updateStr."isoutdoor='$isoutdoor',";
  198. $updateStr = $updateStr."wereexternal='$wereexternal',";
  199. $updateStr = $updateStr."wereoutside='$wereoutside',";
  200. $updateStr = $updateStr."wasyour206='$wasyour206',";
  201. $updateStr = $updateStr."wasthe207='$wasthe207',";
  202. $updateStr = $updateStr."wouldyou96='$wouldyou96',";
  203. $updateStr = $updateStr."plsenter23='$plsenter23',";
  204. $updateStr = $updateStr."usingthe35='$usingthe35',";
  205. $updateStr = $updateStr."isthere='$isthere',";
  206. $updateStr = $updateStr."didthe98='$didthe98',";
  207. $updateStr = $updateStr."didthe99='$didthe99',";
  208. $updateStr = $updateStr."didyou208='$didyou208',";
  209. $updateStr = $updateStr."wasyour100='$wasyour100',";
  210. $updateStr = $updateStr."wereyou101='$wereyou101',";
  211. $updateStr = $updateStr."wereyou165='$wereyou165',";
  212. $updateStr = $updateStr."whilewaiting='$whilewaiting',";
  213. $updateStr = $updateStr."isthe='$isthe',";
  214. $updateStr = $updateStr."isthe168='$isthe168',";
  215. $updateStr = $updateStr."doyou169='$doyou169',";
  216. $updateStr = $updateStr."canyou='$canyou',";
  217. $updateStr = $updateStr."wereyou170='$wereyou170',";
  218. $updateStr = $updateStr."onceseated='$onceseated',";
  219. $updateStr = $updateStr."wereyou='$wereyou',";
  220. $updateStr = $updateStr."didyour173='$didyour173',";
  221. $updateStr = $updateStr."didyour174='$didyour174',";
  222. $updateStr = $updateStr."pleaseorder='$pleaseorder',";
  223. $updateStr = $updateStr."didsomeone176='$didsomeone176',";
  224. $updateStr = $updateStr."werethe177='$werethe177',";
  225. $updateStr = $updateStr."wereyou178='$wereyou178',";
  226. $updateStr = $updateStr."didyour='$didyour',";
  227. $updateStr = $updateStr."didyour180='$didyour180',";
  228. $updateStr = $updateStr."pleaseenter67='$pleaseenter67',";
  229. $updateStr = $updateStr."pleaseenter='$pleaseenter',";
  230. $updateStr = $updateStr."doyou293='$doyou293',";
  231. $updateStr = $updateStr."doyou295='$doyou295',";
  232. $updateStr = $updateStr."doyou297='$doyou297',";
  233. $updateStr = $updateStr."wasthe181='$wasthe181',";
  234. $updateStr = $updateStr."plsexplain='$plsexplain',";
  235. $updateStr = $updateStr."werethe183='$werethe183',";
  236. $updateStr = $updateStr."didyour182='$didyour182',";
  237. $updateStr = $updateStr."didyou='$didyou',";
  238. $updateStr = $updateStr."didyour185='$didyour185',";
  239. $updateStr = $updateStr."whenordering123='$whenordering123',";
  240. $updateStr = $updateStr."didyour186='$didyour186',";
  241. $updateStr = $updateStr."didyou125='$didyou125',";
  242. $updateStr = $updateStr."hasyour='$hasyour',";
  243. $updateStr = $updateStr."pleaseenter83='$pleaseenter83',";
  244. $updateStr = $updateStr."whatis='$whatis',";
  245. $updateStr = $updateStr."pleaseenter84='$pleaseenter84',";
  246. $updateStr = $updateStr."howwould151='$howwould151',";
  247. $updateStr = $updateStr."wasyour='$wasyour',";
  248. $updateStr = $updateStr."whatwas217='$whatwas217',";
  249. $updateStr = $updateStr."doyou300='$doyou300',";
  250. $updateStr = $updateStr."doyou303='$doyou303',";
  251. $updateStr = $updateStr."doyou305='$doyou305',";
  252. $updateStr = $updateStr."didthe='$didthe',";
  253. $updateStr = $updateStr."didthe190='$didthe190',";
  254. $updateStr = $updateStr."wasthe191='$wasthe191',";
  255. $updateStr = $updateStr."didyour192='$didyour192',";
  256. $updateStr = $updateStr."uponfinishing307='$uponfinishing307',";
  257. $updateStr = $updateStr."hostesson223='$hostesson223',";
  258. $updateStr = $updateStr."didyour194='$didyour194',";
  259. $updateStr = $updateStr."onceyou195='$onceyou195',";
  260. $updateStr = $updateStr."atthe='$atthe',";
  261. $updateStr = $updateStr."didthe199='$didthe199',";
  262. $updateStr = $updateStr."manageron='$manageron',";
  263. $updateStr = $updateStr."barguy='$barguy',";
  264. $updateStr = $updateStr."didyou213='$didyou213',";
  265. $updateStr = $updateStr."pleasemark='$pleasemark',";
  266. $updateStr = $updateStr."step2complete='$step2complete',";
  267. $updateStr = $updateStr."didyou255='$didyou255',";
  268. $updateStr = $updateStr."basedon='$basedon',";
  269. $updateStr = $updateStr."diningexperiencepositive='$diningexperiencepositive',";
  270. $updateStr = $updateStr."explainbadexp='$explainbadexp',";
  271. $updateStr = $updateStr."wasenoughservers='$wasenoughservers',";
  272. $updateStr = $updateStr."writeorattachfinal='$writeorattachfinal',";
  273. $updateStr = $updateStr."writefinal='$writefinal',";
  274. $updateStr = $updateStr."anynotes='$anynotes',";
  275. $updateStr = $updateStr."addfinalnotes='$addfinalnotes',";
  276. $updateStr = $updateStr."step3complete='$step3complete',";
  277. $updateStr = $updateStr."uploadsignaturediner='$uploadsignaturediner',";
  278. $updateStr = $updateStr."propext1='$propext1',";
  279. $updateStr = $updateStr."propext2='$propext2',";
  280. $updateStr = $updateStr."propext3='$propext3',";
  281. $updateStr = $updateStr."app1='$app1',";
  282. $updateStr = $updateStr."app2='$app2',";
  283. $updateStr = $updateStr."app3='$app3',";
  284. $updateStr = $updateStr."meal1='$meal1',";
  285. $updateStr = $updateStr."meal2='$meal2',";
  286. $updateStr = $updateStr."meal3='$meal3',";
  287. $updateStr = $updateStr."meal4='$meal4',";
  288. $updateStr = $updateStr."finalupsummary='$finalupsummary',";
  289. $updateStr = $updateStr."check1='$check1',";
  290. $updateStr = $updateStr."creditcard='$creditcard',";
  291. $updateStr = $updateStr."uploadpictures6='$uploadpictures6',";
  292. $updateStr = $updateStr."uploadaddl='$uploadaddl',";
  293. $updateStr = $updateStr."uploada91='$uploada91',";
  294. $updateStr = $updateStr."ifyou='$ifyou',";
  295. $updateStr = $updateStr."photoapp1='$photoapp1',";
  296. $updateStr = $updateStr."photoapp2='$photoapp2',";
  297. $updateStr = $updateStr."photoapp296='$photoapp296',";
  298. $updateStr = $updateStr."photomeal1='$photomeal1',";
  299. $updateStr = $updateStr."photomeal2='$photomeal2',";
  300. $updateStr = $updateStr."photomeal3='$photomeal3',";
  301. $updateStr = $updateStr."photomeal4='$photomeal4',";
  302. $updateStr = $updateStr."uploadfinal='$uploadfinal',";
  303. $updateStr = $updateStr."picofcheck='$picofcheck',";
  304. $updateStr = $updateStr."picofccreceipt='$picofccreceipt' ";
  305. $updateStr = $updateStr."WHERE submission_id = '$submission_id'";
  306. mysql_query($updateStr) or die(mysql_error());
  307.  
  308. } else {
  309.  
  310. mysql_query("INSERT INTO dinerform (submission_id,formID,ip,nameof,unidf,unioi,uploadyour,backimg,mysterydiner,dineremail,dinerpaypal,ihave,stepcomplete288,clickto284,of215,dateof232,clickto88,wouldyou89,wasthe90,werewindows,wasthe,wereexternal200,wasthe94,werethe,isthere201,weremenu202,isoutdoor,wereexternal,wereoutside,wasyour206,wasthe207,wouldyou96,plsenter23,usingthe35,isthere,didthe98,didthe99,didyou208,wasyour100,wereyou101,wereyou165,whilewaiting,isthe,canyou,isthe168,doyou169,wereyou170,onceseated,wereyou,didyour173,didyour174,pleaseorder,didsomeone176,werethe177,wereyou178,didyour,didyour180,pleaseenter67,pleaseenter,doyou293,doyou295,doyou297,wasthe181,plsexplain,werethe183,didyour182,didyou,didyour185,whenordering123,didyour186,didyou125,hasyour,pleaseenter83,whatis,pleaseenter84,howwould151,wasyour,whatwas217,doyou300,doyou303,doyou305,didthe,didthe190,wasthe191,didyour192,uponfinishing307,didyour194,onceyou195,atthe,didthe199,didyou213,uploadpictures6,uploadaddl,uploada91,photoapp1,photoapp2,photoapp296,photomeal1,photomeal2,photomeal3,photomeal4,uploadsignaturediner,ifyou,manageron,hostesson223,barguy,pleasemark,step2complete,didyou255,basedon,diningexperiencepositive,explainbadexp,wasenoughservers,writeorattachfinal,writefinal,anynotes,addfinalnotes,step3complete,uploadfinal,picofcheck,picofccreceipt,propext1,propext2,propext3,app1,app2,app3,meal1,meal2,meal3,meal4,finalupsummary,check1,creditcard)
  311. VALUES ('$submission_id','$formID','$ip','$nameof','$unidf','$unioi','$uploadyour','$backimg','$mysterydiner','$dineremail','$dinerpaypal','$ihave','$stepcomplete288','$clickto284','$of215','$dateof232','$clickto88','$wouldyou89','$wasthe90','$werewindows','$wasthe','$wereexternal200','$wasthe94','$werethe','$isthere201','$weremenu202','$isoutdoor','$wereexternal','$wereoutside','$wasyour206','$wasthe207','$wouldyou96','$plsenter23','$usingthe35','$isthere','$didthe98','$didthe99','$didyou208','$wasyour100','$wereyou101','$wereyou165','$whilewaiting','$isthe','$canyou','$isthe168','$doyou169','$wereyou170','$onceseated','$wereyou','$didyour173','$didyour174','$pleaseorder','$didsomeone176','$werethe177','$wereyou178','$didyour','$didyour180','$pleaseenter67','$pleaseenter','$doyou293','$doyou295','$doyou297','$wasthe181','$plsexplain','$werethe183','$didyour182','$didyou','$didyour185','$whenordering123','$didyour186','$didyou125','$hasyour','$pleaseenter83','$whatis','$pleaseenter84','$howwould151','$wasyour','$whatwas217','$doyou300','$doyou303','$doyou305','$didthe','$didthe190','$wasthe191','$didyour192','$uponfinishing307','$didyour194','$onceyou195','$atthe','$didthe199','$didyou213','$uploadpictures6','$uploadaddl','$uploada91','$photoapp1','$photoapp2','$photoapp296','$photomeal1','$photomeal2','$photomeal3','$photomeal4','$uploadsignaturediner','$ifyou','$manageron','$hostesson223','$barguy','$pleasemark','$step2complete','$didyou255','$basedon','$diningexperiencepositive','$explainbadexp','$wasenoughservers','$writeorattachfinal','$writefinal','$anynotes','$addfinalnotes','$step3complete','$uploadfinal','$picofcheck','$picofccreceipt','$propext1','$propext2','$propext3','$app1','$app2','$app3','$meal1','$meal2','$meal3','$meal4','$finalupsummary','$check1','$creditcard') ")
  312. or die(mysql_error());
  313.  
  314. }
  315. ?>
RAW Paste Data