欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

各位大侠啊帮帮忙,请尽量说的详细点,本人新手

程序员文章站 2022-05-16 11:27:37
...
求助各位大侠啊,帮帮忙,请尽量说的详细点,本人新手



handle_posting


$first_name=$_POST['first_name'];
$last_name=$_POST['last_name'];
$email_address=$_POST['email_address'];
$sex=$_POST['sex'];
$posting=nl2br($_POST['posting']);
$name=$first_name.' '.$last_name;
print"
Thank you,$name for your posting:

$posting


our team will send the lastest meassage to $email_address.


"
$name=urlencode($name);//使用urlencode进行链接
$email_address=urlencode($_POST['email_address']);
echo "

Clickhereto continue.

";
?>


出现Parse error: syntax error, unexpected '$name' (T_VARIABLE) in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\handle_posting.php on line 18错误

------解决方案--------------------
1.输出html的时候尽量使用界定符
2.另外还有引号使用错误的问题.
PHP code


handle_postingThank you,$name for your posting:

$posting

our team will send the lastest meassage to $email_address.