Jump to content

gmc1103

Members
  • Posts

    247
  • Joined

  • Last visited

Community Answers

  1. gmc1103's post in Composer and PHPMailer issue was marked as the answer   
    The problem was here:
    I miss those lines
    use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception;
  2. gmc1103's post in Help with dynamic multiple select was marked as the answer   
    I have fixed using
    if($val!=null){ try { $sql = "SELECT t1.`user_proc`, t1.`user_name` FROM `esmaior_alunos` as t1 INNER JOIN `esmaior_turma` as t2 ON (t1.`user_id_ano_turma` = t2.`id_turma`) WHERE (t2.`id_turma` = :val);"; $query = $DB_con->prepare($sql); $query->bindparam(":val", $val); $query->execute(); $result = $query->fetchAll(PDO::FETCH_ASSOC); foreach ($result as $row) { echo "<option value='{$row['user_proc']}'>{$row['user_name']}</option>\n"; } } catch (PDOException $e) { echo $e->getMessage(); } } and the ajax
    <script> $(document).on("change", '#turma', function(e) { var turmas = $(this).val(); $.ajax({ type: 'post', url: 'classes/getFromDatabase.php', data: {get_option:turmas}, dataType: 'html', success: function(resposta) { console.log(resposta); document.getElementById("alunos").innerHTML=resposta; } }); }); </script> For those with same problem
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.