初学者。。。大家帮忙了。。

edodo 2005-07-21 07:27:01
1.
<----!nn.htm--->
html>
<head>
<title>发信给网管</title>
</head>
<body>
<h2 align="center">网管收信</h2><br>
<hr><br>
<center>
<form action="mail.php">
发件人:<input type="text" name="from" size=25><br>
主题:<input type="text" name="subject" size=20><br>
内容:
<textarea name="content" cols=80 rows=15>你好,站长:</textarea><br>
<input type="submit" value="寄出"> <input type="reset" value="重写"><br>
</form>
</body></html>
<---!mail.php-->
<?php
if (empty($from) or empty($subject) or empty($content))
{echo "没有完成填写,请<a href="nn.htm">返回</a>"};
$body="[主题] $subject";
$body.="[发件人] $from";
$body.=$content;
$deal=mail("webmaster@163.com",$subject,$body,"From:$from");
if ($deal) {echo "寄件成功!";}else{echo "寄件失败!!!";}
?>
Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in C:\Apache\Apache2\htdocs\mail.php on line 3

2.
<html>
<head>
<title>love</title>
</head>
<body bgcolor=red>
<center>
<form action="displayall.php" method="post">
<table>
<tr>
<td valign="top">
<select name="colors[]" size="5" multiple>
<option value ="red">red</option>
<option value ="green">green</option>
<option value ="blue">blue</option>
<option value ="purple">purple</option>
<option value ="yellow">yellow</option>
</select>
</td>
</tr>
<tr>
<td valign="top">
please enter your address:
</td>
<td valign="top">
<input type="text" name="address[]"><br>
<input type="text" name="address[]"><br>
<input type="text" name="address[]"><br>
</td>
</tr>
<tr>
<td colspan="2">
<input type="submit" name ="submit" value="submit">
</td>
</tr>
</table>
</form>
</body>
</html>
<--!displayall.php--->
<html>
<head>
<title>listin</title>
</head>
<body>
<? php
echo "you like the color:$colors[]<br>";
echo "your address:$address[]<br>";
?>
Parse error: parse error, unexpected T_ECHO in C:\Apache\Apache2\htdocs\displayall.php on line 7

就这下边的一段不会写啊。帮忙,,
</body>
</html>
...全文
82 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
edodo 2005-07-22
  • 打赏
  • 举报
回复
Parse error: parse error, unexpected T_ECHO in C:\Apache\Apache2\htdocs\displayall.php on line 7
ice_berg16 2005-07-21
  • 打赏
  • 举报
回复
echo "you like the color:" . join( ",",$_POST['colors']) . "<br>";
echo "your address:" . join( ",",$_POST['address']) . "<br>";

21,891

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧