why1128
新手上路

UID 82418
精华
0
积分 7
帖子 3
金钱 7 喜悦币
威望 0
人脉 0
阅读权限 10
注册 2006-10-31 来自 zh
状态 离线
|
请大家帮忙看看这段代码是哪出了问题?
jsp程序调用放在服务器上的CGI-BIN文件夹里面的PHP程序时出现的错误,有点长,请各位高手帮忙耐心看看!是程序的哪个地方出了问题?小妹谢谢各位了!
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>在线反馈表单</title>
<link href="css.css" rel="stylesheet" type="text/css">
<SCRIPT language=JavaScript>
function CheckInput(){
if(form.name.value=='')
{
alert("Pleas input your First name!");
form.name.focus();
return false;
}
if(form.lastname.value=='')
{
alert("Pleas input your Last name!");
form.lastname.focus();
return false;
}
if(form.company.value=='')
{
alert("Pleas input your Company Name!");
form.company.focus();
return false;
}
if(form.address.value=='')
{
alert("Pleas input your Address!");
form.address.focus(); parse expecting alidate
return false;
}
if(form.city.value=='')
{
alert("Pleas input your City!");
form.city.focus();
return false;
}
if(form.code.value=='')
{
alert("Pleas input your Zip Code!");
form.code.focus();
return false;
}
if(form.country.value=='')
{
alert("Pleas input your Country!");
form.country.focus();
return false;
}
if(form.phone.value=='')
{
alert("Pleas input your Country Phone!");
form.phone.focus();
return false;
}
if (form.phone1.value=='')
{
alert ("Please input your Area Phone!");
form.phone1.focus();
return false;
}
if (form.phone2.value=='')
{
alert ("Pleas input your Phone Number!");
form.phone2.focus();
return false;
}
if(form.fax.value==''){
alert("Pleas input your Country Phone!");
form.fax.focus();
return false;
}
if (form.fax1.value=='')
{
alert ("Please input your Area Phone!");
form.fax1.focus();
return false;
}
if (form.fax2.value=='')
{
alert ("Pleas input your Phone Number!");
form.fax2.focus();
return false;
}
if(form.email.value=='')
{
alert("Pleas input your Email Address!");
form.email.focus();
return false;
}
if(form.website.value==''){
alert("Pleas input Website!");
form.website.focus();
return false;
}
if(form.comments.value==''){
alert("Pleas input inquiries&Comments!");
form.comments.focus();
return false;
}
return true;
}
</SCRIPT>
</head>
<body>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<form name="form" method="post" action="validate.php"target="_blank" class="content" onSubmit="return CheckInput();">
<div align="center">
<center>
<table width="100" border="1" cellpadding="2">
<tr>
<td class="td1" width="599" align="center" height="781"><table width="864" border="0" cellspacing="1" cellpadding="0">
<tr class="trclass">
<td width="129" align="center" class="trclass" height="34">
<p align="left">First Name*</p>
</td>
<td width="725" align="left" class="trclass" height="35"><input name="name" type="text" class="formclass" id="name" size="55"></td>
</tr>
<tr class="trclass">
<td align="center" class="trclass" width="129" height="35">
<p align="left">Last Name*</p>
</td>
<td align="left" class="trclass" width="725" height="35"><input name="lastname" type="text" class="formclass" id="lastname" size="55"></td>
</tr>
<tr class="trclass">
<td align="center" class="trclass" width="129" height="27">
<p align="left">Gender</td>
<td align="left" class="trclass" width="725" height="27">Mr <input name="cender" type="radio" value="V1" checked >
Ms<input name="cender" type="radio" value="V2"></td>
</tr>
<tr class="trclass">
<td align="center" class="trclass" width="129" height="30">
<p align="left">Company Name*</p>
</td>
<td align="left" class="trclass" width="725" height="35"><input name="company" type="text" class="formclass" id="company" size="55"></td>
</tr>
<tr class="trclass">
<td align="center" class="trclass" width="129" height="29">
<p align="left">Business Type*</td>
<td align="left" class="trclass" width="725" height="29"><input type="checkbox" name="business" value="business" checked>Consumer
<input type="checkbox" name="business1" value="business1">Distributor
<input type="checkbox" name="business2" value="business2">Manufactuer
<input type="checkbox" name="business3" value="business3">Retailer</td>
</tr>
<tr class="trclass">
<td align="center" class="trclass" width="129" height="29">
<p align="left">Address*</p>
</td>
<td align="left" class="trclass" width="720" height="35"><input name="address" type="text" class="formclass" id="address" size="55"></td>
</tr>
<tr class="trclass">
<td align="center" class="trclass" width="129" height="31">
<p align="left">City*</p>
</td>
<td align="left" class="trclass" width="725" height="35"><input name="city" type="text" class="formclass" id="city" size="55"></td>
</tr>
<tr class="trclass">
<td align="center" class="trclass" width="129" height="31">
<p align="left">Zip Code*</p>
</td>
<td align="left" class="trclass" width="725" height="35"><input name="code" type="text" class="formclass" id="code" size="55"></td>
</tr>
<tr class="trclass">
<td align="center" class="trclass" width="129" height="30">
<p align="left">Country*</p>
</td>
<td align="left" class="trclass" width="725" height="35"><input name="country" type="text" class="formclass" id="country" size="55"></td>
</tr>
<tr>
<td align="center" class="trclass" width="129" height="34">
<p align="left">Phone No*</p>
</td>
<td align="left" class="trclass" width="725" height="26">
<input name="phone" type="text" class="formclass" id="phone" size="20">-<input name="phone1" type="text" class="formclass" id="phone1" size="18">-<input name="phone2" type="text" class="formclass" id="phone2" size="11">(country code-area code-phone no.)</td>
</tr>
</center>
<tr class="trclass">
<td align="center" valign="top" class="trclass" width="129" height="39">
<p align="left">Fax No</p>
</td>
<center>
<td align="left" class="trclass" width="725" height="42"><input type="text" name="fax" size="20">-<input type="text" name="fax1" size="18">-<input type="text" name="fax2" size="11">(country code-area code-phone no.)</td>
</tr>
<tr class="trclass">
<td align="center" valign="top" class="trclass" width="129" height="36">
<p align="left">Email Address*</td>
<td align="left" class="trclass" width="725" height="35"><input name="email" type="text" class="formclass" id="email" size="55">
</td>
</tr>
<TD>
<tr class="trclass">
<td align="center" valign="top" class="trclass" width="129" height="42">
<p align="left">Website</td>
<td align="left" class="trclass" width="725" height="35"><input name="website" type="text" class="formclass" id="website" size="55">
</td>
</tr>
<tr class="trclass">
<td align="center" valign="top" class="trclass" width="129" height="214">
<p align="left"></p>
<p align="left"> </p>
<p align="left"></p>
<p align="left"></p>
<p align="left">Inquiries</p>
<p align="left">&Comments</p>
</td>
<td align="left" class="trclass" width="725" height="215">
<p align="left"><textarea name="comments" cols="55" rows="10" id="comments"></textarea></p>
</td>
</tr>
<tr class="trclass">
<td colspan="2" align="center" width="839" height="66">
<p align="left">
<input type="submit" name="Submit" value="Submit"> <input type="reset" name="Submit" value="Reset"></p>
</td>
</tr>
</table></td>
</tr>
</table>
</div>
</form>
</body>
</html>
上面这个文件调用下面这个PHP文件出现的错误提示,请教高手是哪个方面出现了问题?
HTTP404-Not Found
The requested URL was not found on this server.
十分抱歉,您要查看的网页当前已过期,或已更名。
请查看您在浏览器“地址”栏中键入的网页地址拼写是否正确。
<?php
if(@$_POST['action'] )
{
$to = "salei@creup.com";
$title = "网站上反馈回来的信息";
$body = "name".$_POST['name']."\r\n";
$body = "lastname".$_POST['lastname']."\r\n";
$body = "company".$_POST['company']."\r\n";
$body = "address".$_POST['address']."\r\n";
$body = "city".$_POST['city']."\r\n";
$body = "code".$_POST['code']."\r\n";
$body = "country".$_POST['country']."\r\n";
$body = "phone".$_POST['phone']."\r\n";
$body = "phone1".$_POST['phone1']."\r\n";
$body = "phone2".$_POST['phone2']."\r\n";
$body = "fax".$_POST['fax']."\r\n";
$body = "fax1".$_POST['fax1']."\r\n";
$body = "fax2".$_POST['fax2']."\r\n";
$body = "email".$_POST['email']."\r\n";
$body = "website".$_POST['website']."\r\n";
$body = "comments".$_POST['comments']."\r\n";
if (name.value.length < 6)
{
{
echo "<script language=JavaScript> alert('长度不能小于六位数!')</script>";
echo "<META HTTP-EQUIV=REFRESH CONTENT='0;URL=interface.php'>";
}
}
if (lastname.value.length < 6)
{
{
echo "<script language=JavaScript> alert(‘长度不能少于六位数!')</script>";
echo "<META HTTP-EQUIV=REFRESH CONTENT='0;URL=interface.php'>";
}
}
if (code.value.length < 6)
{
{
echo "<script language=JavaScript> alert(’邮政编码不有少于六位数')</script>";
echo "<META HTTP-EQUIV=REFRESH CONTENT='0;URL=interface.php'>";
}
}
if(checkMail(form.email.value)==false)
{
echo "<script language=JavaScript>alert('请输入正确的EMAIL地址!'); </script>";
echo "<META HTTP-EQUIV=REFRESH CONTENT='0;URL=interface.php'>";
}
function checkMail(s)
{
var pattern=/\w+@\w+\.[a-z]+/;
if(pattern.test(s))
{
return true;
}
else
{
return false;
}
}
if (@mail($to,$title,$body))
{
echo("信息发送成功,谢谢你的光临¡");
exit;
}
else
{
echo("信息发送失败,请稍后再试!");
echo "<META HTTP-EQUIV=REFRESH CONTENT='0;URL=interface.php'>";
}
}
?>
|
|