<!DOCTYPE html>
<html> 
<head>
    <title>Reminders Configuration Page</title>
    
    <script>
        function showUser(str) {
            if (str=="") {
            document.getElementById("txtHint").innerHTML="";
            return;
            }   
    var xmlhttp=new XMLHttpRequest();
    xmlhttp.onreadystatechange=function() {
    if (this.readyState==4 && this.status==200) {
      document.getElementById("txtHint").innerHTML=this.responseText;
    }
  }
  
  xmlhttp.open("GET","serviceconfigone.php?q="+str,true);
  xmlhttp.send();
  }       
    
    </script>
    <style> 
    body {
          padding-left: 20px;
          padding-bottom: 10px;

    }
    </style>
    
<?php
echo '<link rel='.'"'.'stylesheet'.'"'. 'type='.'"'.'text/css'.'"'. 'href='.'"'.'https://amjaysinglestoretest.myappts.ca/src/assets/ext/bootstrap/css/bootstrap.min.css?52FX8'.'"'.'>'; 
echo '<link rel='.'"'.'stylesheet'.'"'. 'type='.'"'.'text/css'.'"'. 'href='.'"'.'https://amjaysinglestoretest.myappts.ca/src/assets/ext/jquery-ui/jquery-ui.min.css?52FX8'.'"'.'>'; 
echo '<link rel='.'"'.'stylesheet'.'"'.'type='.'"'.'text/css'.'"'. 'href='.'"'.'https://amjaysinglestoretest.myappts.ca/src/assets/ext/jquery-qtip/jquery.qtip.min.css?52FX8'.'"'.'>'; 
echo '<link rel='.'"'.'stylesheet'.'"'. 'type='.'"'.'text/css'.'"'. 'href='.'"'.'https://amjaysinglestoretest.myappts.ca/src/assets/ext/trumbowyg/ui/trumbowyg.min.css?52FX8'.'"'.'>'; 
echo '<link rel='.'"'.'stylesheet'.'"'. 'type='.'"'.'text/css'.'"'. 'href='.'"'.'https://amjaysinglestoretest.myappts.ca/src/assets/css/backend.css?52FX8'.'"'.'>'; 
echo '<link rel='.'"'.'stylesheet'.'"'. 'type='.'"'.'text/css'.'"'. 'href='.'"'.'https://amjaysinglestoretest.myappts.ca/src/assets/css/general.css?52FX8'.'"'.'>'; 
echo '<link rel='.'"'.'stylesheet'.'"'. 'type='.'"'.'text/css'.'"'. 'href='.'"'.'https://amjaysinglestoretest.myappts.ca/src/assets/js/popup.js?52FX8'.'"'.'>'; 
?>

</head>

<body>
<h2>Reminders Configuration Page</h2>
<form id="" method="POST" action="reminder_process.php"> 


<select id="service" name="service" onchange="showUser(this.value)">
<?php
require('config.php');
$linkID = new PDO('mysql:host='.Config::DB_HOST.';dbname='.Config::DB_NAME, Config::DB_USERNAME, Config::DB_PASSWORD);
$linkID->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // Setting ERRMODE

$result = $linkID->query("SELECT id, name FROM ea_services")->fetchAll(PDO::FETCH_ASSOC);

echo '<option value='.'"'.'"'.'>'.'PICK'.'</option>';
foreach($result as $r){
echo '<option value='.'"'.$r['id'].'"'.'>'.$r['name'].'</option>';  
}
echo '</select>';
?>


<br>

<div id="txtHint"></div>


</form>    
</body>
</html>