Bitte mal so probieren:
PHP
<?php
include("formular/global.inc.php");
$host=$_SERVER['SERVER_NAME'];
$btnSubmit = $_POST['btnSubmit];
if($btnSubmit)
{
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
pt_register('POST','DomainName');
pt_register('POST','OfferAmount');
pt_register('POST','FirstName');
pt_register('POST','LastName');
pt_register('POST','BusinessOrganization');
pt_register('POST','Email');
pt_register('POST','PhoneNumber');
pt_register('POST','FaxNumber');
pt_register('POST','Address');
pt_register('POST','City');
pt_register('POST','State');
pt_register('POST','ZIPPostalcode');
pt_register('POST','Country');
pt_register('POST','QuestionsComments');
if($OfferAmount=="" || $FirstName=="" || $LastName=="" || $Email=="" || $PhoneNumber=="" || $Address=="" || $City=="" || $State=="" || $ZIPPostalcode=="" || $Country=="" || $QuestionsComments=="" ){
$errors=1;
$error.="[*]You did not enter one or more of the required fields. Please go back and try again.";
}
if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$Email)){
$error.="[*]Invalid email address entered";
$errors=1;
}
if($errors==1) echo $error;
else{
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="DomainName: ".$DomainName."
OfferAmount: ".$OfferAmount."
FirstName: ".$FirstName."
LastName: ".$LastName."
BusinessOrganization: ".$BusinessOrganization."
Email: ".$Email."
PhoneNumber: ".$PhoneNumber."
FaxNumber: ".$FaxNumber."
Address: ".$Address."
City: ".$City."
State: ".$State."
ZIPPostalcode: ".$ZIPPostalcode."
Country: ".$Country."
QuestionsComments: ".$QuestionsComments."
";
$message = stripslashes($message);
mail(">> Edit by Admin :Das Posten von Email-Adressen ist hier nicht gestattet <<> Edit by Admin :Das Posten von Email-Adressen ist hier nicht gestattet <<");
$make=fopen("formular/admin/data.dat","a");
$to_put="";
$to_put .= $DomainName."|".$OfferAmount."|".$FirstName."|".$LastName."|".$BusinessOrganization."|".$Email."|".$PhoneNumber."|".$FaxNumber."|".$Address."|".$City."|".$State."|".$ZIPPostalcode."|".$Country."|".$QuestionsComments."
";
fwrite($make,$to_put);
header("Refresh: 0;url=thanks.html");
?><?php
}
}
?>
<html>
<head>
<title>Untitled</title>
</head>
<body>
<form enctype='multipart/form-data' action='process.php' method='post'>
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td height="5" width="150"> </td>
<td></td>
</tr>
<tr>
<td>Domain</td>
<td><input disabled type="text" value="<? echo $host;?>" name='DomainName' maxlength="40"> </td>
</tr>
<tr>
<td>Information</td>
<td><input class="Field" type=text name='OfferAmount' maxlength="10"></td>
</tr>
<tr>
<td height="4"> </td>
</tr>
<tr>
<td>First Name</td>
<td><input class="Field" type=text name='FirstName' maxlength="14"></td>
</tr>
<tr>
<td>Last Name</td>
<td><input class="Field" type=text name='LastName' maxlength="23"></td>
</tr>
<tr>
<td>Business / Organization</td>
<td><input class="Field" type=text name='BusinessOrganization' maxlength="40"></td>
</tr>
<tr>
<td>E-mail</td>
<td><input class="Field" type=text name='Email' maxlength="40"></td>
</tr>
<tr>
<td>Phone Number</td>
<td><input class="Field" type=text name='PhoneNumber' maxlength="40"></td>
</tr>
<tr>
<td>Fax Number</td>
<td><input class="Field" type=text name='FaxNumber' maxlength="40"></td>
</tr>
<tr>
<td>Address</td>
<td><input class="Field" type=text name='Address' maxlength="40"></td>
</tr>
<tr>
<td>City</td>
<td><input class="Field" type=text name='City' maxlength="20"></td>
</tr>
<tr>
<td>State</td>
<td><input class="Field" type=text name='State' maxlength="20"></td>
</tr>
<tr>
<td>ZIP / Postalcode</td>
<td><input class="Field" type=text name='ZIPPostalcode' maxlength="20"></td>
</tr>
<tr>
<td>Country</td>
<td><input class="Field" type=text name='Country' maxlength="20"></td>
</tr>
<tr>
<td>Questions / Comments</td>
<td><input class="Field" type=text name='QuestionsComments' rows="10" cols="50"></td>
</tr>
<tr>
<td height="4"> </td>
</tr>
<tr>
<td> </td>
<td><input class="Button" type=submit name="btnSubmit" value='Submit Form'>
<input class="Button" type=reset value='Reset Form'>
</td>
</tr>
</table>
</form>
</body>
</html>
Alles anzeigen