저는 양식 작업을하고 있었고 PHP를 통해 이메일을 통해 데이터를 보내야했습니다. 나는 코딩을 처음 접했습니다. 방금 PHP로 작업하기 시작했습니다. 내 양식 작동 심지어 그것을 통해 이메일을받을 수 있지만 PHP 페이지가 비어 있습니다. 에코와 오류보고를 사용했지만 아무 것도 나타나지 않았습니다. 아마 초보자 실수 야. 내 PHP 코드 :PHP는 작동하지만 아무 내용도 보여주지 않습니다.
<?php
$name = $_POST['fullName'];
$email_address = $_POST['email'];
$phone = $_POST['phoneNumber'];
$gender = $_POST['gender'];
$country = $_POST['country'];
$age = $_POST['age'];
$headers = "From: [email protected]";
$to = '[email protected]';
$email_subject = "Website Contact Form: $name";
$email_body = "You have received a new message from your website contact form.\n\n"."Here are the details:\n\nName: $name\n\nEmail: $email_address\n\nPhone: $phone\n\ngender: $gender\n\ncountry: $country\n\nage: $age";
mail($to,$email_subject,$email_body,$headers);
return true;
echo "thank you"
?>
은'true를 돌려 제거, 그것은 작동' – jszobody
! 고마워요! – Ali