I am a beginner. I want to create a questionnaire site by copying the source of the instruction book in a circle and register the contents entered by the user in Mysql, but it is not an error, but it is not registered.

Error message
Error message
Applicable source code

<? php
$dsn ='mysql: dbname = phpkiso;host = localhost&apos ;;
$user ='root&apos ;;
$password ='&apos ;;
$dbh = new PDO ($dsn, $user, $password);
$dbh->query ('SET NAMES utf8');

$namae = $_ POST ['namae'];
$email = $_ POST ['email'];
$goiken = $_ POST ['goiken'];

$namae = htmlspecialchars ($namae);
$goiken = htmlspecialchars ($goiken);
$email = htmlspecialchars ($email);

print'Thanks for your feedback.&apos ;;
print''. $namae.'like&apos ;;
An email was sent to print&apos ;. Please check&apos ;;

$mail_sub ='Survey accepted&apos ;;
Dear $mail_body = $namae."\ nThanks for your survey" ;;
$mail_body = html_entity_decode ($mail_body, ENT_QUOTES,"UTF-8");
$mail_head ='From:******@ gmail.com&apos ;;
mb_language ('Japanese');
mb_internal_encoding ("UTF-8");
mb_send_mail ($email, $mail_sub, $mail_body, $mail_head);

$sql ='INSERT INFO anketo (namae, email, goiken) VALUES ("'. $namae.'","'. $email.'","'. $goiken.'")&apos ;;
$stmt = $dbh->prepare ($sql);
$stmt->execute ();

$dbh = null;



Please describe what you tried for the problem here.

Supplemental information (FW/tool version etc.)

Please provide more detailed information here.