我今天刚开始学习php,非常精彩:p
不确定我做错了什么
我收到了第一个错误
Parse error: syntax error, unexpected T_VARIABLE in C:\wamp\www\lesson1\form_response.php on line 20
<?php
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$street = $_POST['street'];
$city = $_POST['city'];
$phonenumber = $_POST['phonenumber'];
$email = $_POST['email'];
$myemail = 'chrnna@gmail.com'
$email_message = "First Name: {$firstname} <br> Last Name: {$lastname} <br> Street: {$street} <br> City: {$city} <br> Phone Number: {$phonenumber} <br> Email: {email}";
mail($myemail,'test form',$email_message);
?>
答案 0 :(得分:3)
忘了分号。
$myemail = 'xxxxxxxxx@gmail.com';
可能不想发布您的实际电子邮件...
答案 1 :(得分:1)
可能是因为你错过了$myemail = 'chrnna@gmail.com'
之后的;