Update functions.php
authorPatrick McGuire <insidenothing@gmail.com>
Mon, 1 Jun 2020 14:18:52 +0000 (10:18 -0400)
committerGitHub <noreply@github.com>
Mon, 1 Jun 2020 14:18:52 +0000 (10:18 -0400)
admin/functions.php

index 8dc131f..1158875 100644 (file)
@@ -1,5 +1,12 @@
 <?PHP
 
+function id2petition($id){
+  global $petition;
+  $q = "select petition_name from petition where petition_id = '$id'";
+  $r = $petition->query($q);
+  $d = mysqli_fetch_array($r,MYSQLI_ASSOC);
+  return $d['petition_name'];
+}
 function id2group($id){
   global $petition;
   $q = "select name from groups where id = '$id'";