<form method=post action=index1.php>
<input type=hidden name=active value=1>
<table width="376" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top"> </td>
<td align="left" valign="top"><img src="../../images/spacer.gif" width="1" height="25" /></td>
<td align="left" valign="top"><?php
$a=0;
while(list($key, $val) = each($_POST)) {
#print "<br>$val -".strlen($val);
if (strlen($val)>1) {
$a++;
}
}
if ($a <5) {
if (!$active==0) {
print "<b><font color=#ff6600>You probably forgot something.</font></b><br>";
}
?></td>
<td align="left" valign="top"> </td>
</tr>
<tr>
<td align="left" valign="top"> </td>
<td align="left" valign="top" bgcolor="#999999"> </td>
<td align="left" valign="top" bgcolor="#999999"> </td>
<td align="left" valign="top"> </td>
</tr>
<tr>
<td width="8" align="left" valign="top"> </td>
<td width="8" align="left" valign="top" bgcolor="#999999"> </td>
<td align="left" valign="top" bgcolor="#999999">Name<br />
<input name=name type=text id="name" value=<?print "\"$name\""?> size=26 maxlength=50></td>
<td width="8" align="left" valign="top"> </td>
</tr>
<tr>
<td width="8" align="left" valign="top"> </td>
<td width="8" align="left" valign="top" bgcolor="#999999"> </td>
<td align="left" valign="top" bgcolor="#999999">E-mail<br />
<input name=email type=text id="email" value=<?print "\"$email\""?> size=26 maxlength=50></td>
<td width="8" align="left" valign="top"> </td>
</tr>
<tr>
<td width="8" align="left" valign="top"> </td>
<td width="8" align="left" valign="top" bgcolor="#999999"> </td>
<td align="left" valign="top" bgcolor="#999999">Subject<br />
<select name="subject">
<option value="[Support] Something else" selected="selected">Please select a subject
<option value="[Support] Custom type(face)">Custom type(face)
<option value="[Support] Technical support">Technical support
<option value="[Support] Licensing">Licensing
<option value="[Support] Ordering help">Ordering help
<option value="[Support] Website comments">Website comments
<option value="[Support] Something else">Something else
</select></td>
<td width="8" align="left" valign="top"> </td>
</tr>
<tr>
<td width="8" align="left" valign="top"> </td>
<td width="8" align="left" valign="top" bgcolor="#999999"> </td>
<td align="left" valign="top" bgcolor="#999999">Message<br />
<textarea name="message" cols="45" rows="12" class="textfield" id="message"></textarea></td>
<td width="8" align="left" valign="top"> </td>
</tr>
<tr>
<td width="8" align="left" valign="top"> </td>
<td width="8" align="left" valign="top" bgcolor="#999999"> </td>
<td align="left" valign="top" bgcolor="#999999">All fields are required.
<br />
<input name="submit" type="submit" value="Submit" />
<?php
} else {
print "<br><b><font color=#ff6600>Thank you! We will come back to you soon.</font></b>";
$body = "Contact form\n\nName: $name\nSubject: $subject\nEmail: $email\nMessage: $message\n";
mail("mail@webzovoort.nl",$subject,$body,"From: $email\r\n");
if ($mailing==1) {
mail("mail@webzovoort.nl",$subject,"","From: $email\r\n");
}
}
?>
<br />
<br /></td>
<td width="8" align="left" valign="top"> </td>
</tr>
</table>
<img src="../../images/various/divider.gif" width="360" height="8" />
</form>
此表单在其他服务器上运行正常。但现在我感动它没有。表单确实发送了一封电子邮件,但它没有填写。它在PHP 5.2.12的服务器上运行
答案 0 :(得分:1)
首先是
$HTTP_POST_VARS
已弃用$_POST
而不是