email form
Hej. jeg er ved at lave en form som sende en mail. men kan ikke få den til at tjekke om alt er som det skal være..jeg vil have den tjekker om email indholder @ og er .
okay de har accepteret betingelserne osv.
og ellers om resten indholer data.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style1 {color: #FF0000}
body,td,th {
color: #000;
}
body {
background-color: #B9E7FF;
}
-->
</style>
</head>
<body>
<div align="center">
<table width="1000" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center">
<table width="460" height="188" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><form action="ughsout.php" method="post">
<!-- DO NOT change ANY of the php sections -->
<img src="../grafik/logo.gif" alt="" width="568" height="179" />
</p>
<p align="center"> </p>
<hr align="left" />
<p align="left">
<?php
$nameis = $_POST['nameis'];
$email = $_POST['email'];
$url = $_POST['url'];
$subject = $_POST['subject'];
$question = $_POST['question'];
$cheakboxsignup = $_POST['cheakboxsignup'];
if (eregi('http:', $feedback)) { die ("Do NOT try that! ! "); }
if((!$email == "@") && (!strstr($email,".")))
{
echo "";
$tellem = "<h2>Feedback was NOT submitted</h2>\n";
}
if(empty($url) || empty($subject) || empty($email)) {
echo "";
}
echo $tellem;
if ($emailvalidation == "y") {
$req1 = "Email format Validation \n" ;
}
if ($fieldvalidation == "y") {
$req2 = "Required Form Field Validation \n";
}
if ($htmlcontrol == "y") {
$req3 = "More intergratd HTML (in form) \n";
}
if ($phpform == "y") {
$req4 = "Improved PHP form script generator \n";
}
if ($htmlform == "y") {
$req5 = "A complete HTML form generator \n";
}
$req = $req1 . $req2 . $req3 . $req4 . $req5;
$todayis = date("l, F j, Y, g:i a") ;
$nameis = $nameis;
$email = $email;
$url = $url;
$subject = $subject;
$question = $question;
$cheakboxsignup = $cheakboxsignup;
$message = " $todayis [EST] \n
From: $nameis ($email)
Url: $url
subject: $subject
Anything els to say: $question
By submitting this application, you agree to the Terms and Conditions: $cheakboxsignup
";
$from = "From: $email\r\n";
mail("MIN EMAIL", $subject, $message, $from);
$screenout = str_replace("\n", "<br/>", $message);
?>
</p>
</form>
<p align="left"> </p></td>
</tr>
<tr>
<td><table width="427" border="1" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="423"><div align="left"><?php echo $screenout ?></div></td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</div></td>
</tr>
</table>
</div>
<h3 align="center"> </h3>
<p>
<td> </td>
</p>
</body>
</html>
