-2

Am a basic developer and want's some help that how can i get a PHP variable information using from HTML ?

Variable is declared in the same page. I have tried the following approach but getting error. Any help is deeply appreciated.

if (isset($_POST['signup'])) {
        $name = $_POST['namePHP'];
        $email = $_POST['emailPHP'];

$mail->Subject = 'Live-X || A New Registration Executed';
            $mail->Body = '<div>Respected <b>Sir</b></div>
                           <ul>
                                <li><b>Name: </b></li>'<?$name?>'                                      
                           </ul>

                           <div>Thanking You</div>';
            $mail->send();