Question: I need help whit my Code (PostgreSQL).

I get in my row Result `{{2.0,10}{2.0,10}}` but I want `{{2.0,10}{3.0,20}}`.
I don't know where my error is. Result is text `[ ]` its must be a 2D Array

This is Table1

| Nummer | Name | Result |
| --- | --- | --- |
| 01 | Kevin |  |

This is Table2

| Nummer | Exam | ProfNr |
| --- | --- | --- |
| 01 | 2.0 | 10 |
| 01 | 3.0 | 20 |

My Code is

```
update public."Table1" as t1
   set "Result" = ARRAY[[t2."Exam", t2."ProfNr"],[t2."Exam",t2."ProfNr"]]
from public."Table2" as t2 
where t1."Nummer"= 01
and t2."Nummer"=01;

```

Answer: 
After your `$mail->send();` function, you could try using the PHP in-built function `header();`

So for instance in your case:

```
header('Location: /');

```

This should redirect to home page after submission, where / is the main root of home page.

Some more information on header(): <https://www.php.net/manual/en/function.header.php>
You should handle your `$mail->send()` to handle the success and failed response.
Would write the code like this:

```

<?php
         use PHPMailer\PHPMailer\PHPMailer;

         if(isset($_POST['name']) && isset($_POST['email'])){
            $name = $_POST['name'];
                $email = $_POST['email'];
                $subject = $_POST['subject'];
                $body = $_POST['body'];

                require_once "PHPMailer/PHPMailer.php";
                require_once "PHPMailer/SMTP.php";
                require_once "PHPMailer/Exception.php";

    $mail = new PHPMailer();

    //smtp settings
    $mail->isSMTP();
    $mail->Host = "smtp.gmail.com";
    $mail->SMTPAuth = true;
    $mail->Username = "website@gmail.com";
    $mail->Password = '123';
    $mail->Port = 465;
    $mail->SMTPSecure = "ssl";

    //email settings
    $mail->isHTML(true);
    $mail->setFrom($email, $name);
    $mail->addAddress("website@gmail.com");
    $mail->Subject = ("$email ($subject)");
    $mail->Body = $body;

     if($mail->send()){
        header('Location: your_url_here.php');
     }else{
        //do something when email delivery fails.
     }
}

?>```

```