cgi formular

rosinenbomber-jk1

Aktives Mitglied
hallo,

ich brauche wieder einmal dringend hilfe! ich moechte per html ein formular erstellen, das ich per cgi an meine mail adresse sende. kann mir hier irgend jemand mal eine html datei bzw. quelltext erstellen, in der nur mal z.b. 2 felder vorkommen in denen man zahlen eingeben kann. und eine cgi datei, die meine bestellung annimmt und als e-mail an mich sendet. ich wuerde gerne mal ein funktionierendes beispiel haben, das ich dann editieren kann und so vielleicht auch die funktio verstehe. irgenwie habe ich den ganzen tag und auch die nacht gegoogelt aber nichts zu stande bekommen, das aergert mich ein wenig. vielleicht ist jemand so nett und hilft mir mit einem beispiel weiter. vielen dank im voraus fuer die hilfe...

gruesse aus frankfurt - danny
 
ich habe es nun soweit mit editieren hinbekommen, also die grundfuktion habe ich :) jippie...
jetzt brauch ich nur noch ein bisschen experten hilfe. ich habe einmal eine html datei und eine php datei.
ich moechte das die e-mail die zu mir gesendet wird, die werte untereinander auflistet und nicht wie bisher nebeneinander.
zweitens moechte ich keine emailfelder und somit auch die bedinungung raus haben.
der betreff soll immer gleich sein: Bestellung
das war es eigentlich, aber ich habe schon so viel probiert, aber irgendwie mache ich nur alles kaputt :-(
kann mir einer helfen? vielen dank im voraus!

html datei:
CODE <html>

<head>
<meta http-equiv="Content-Language" content="de">

<title></title>
<style>
BODY{color:#000000; font-size: 8pt; font-family: Verdana}
.button {background-color: rgb(128,128,128); color:#ffffff; font-size: 8pt;}
.inputc {font-size: 8pt;}
.style3 {font-size: xx-small}
</style>
</head>

<body topmargin="0" leftmargin="0">

<form name="phpformmailer" action="contact_process.php" align="center" method="post">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="45%" id="AutoNumber1" height="189">
<tr>
<td width="100%" colspan="6" align="center" bgcolor="#60BB46" height="20" style="border-style: solid; border-width: 1">
<b><font size="2" color="#FFFFFF">WOLFIN IB LIEFERPROGRAMM</font></b></td>
</tr>
<tr>
<td width="100%" colspan="6" align="center" height="20" bgcolor="#D5E9F2" style="border-right-style: solid; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1">
<div style="border-left-style: solid; border-left-width: 1; padding-left: 4">
<b><font size="2">WOLFIN IB-Bahnen, schwarz</font></b></div>
</td>
</tr>
<tr>
<td width="16%" height="34" align="center" style="border-left-style: solid; border-left-width: 1; border-top-style: solid; border-top-width: 1">
<font size="1">Produkt-<br>
bezeichnung</font></td>
<td width="16%" height="34" align="center"><font size="1">Dicke<br>
mm</font></td>
<td width="17%" height="34" align="center"><font size="1">Breite<br>
mm</font></td>
<td width="17%" height="34" align="center"><font size="1">Länge<br>
m</font></td>
<td width="17%" height="34" align="center"><font size="1">
<span style="font-weight: 400">Fläche<br>
m2</span></font></td>
<td width="17%" height="34" align="center" style="border-right-style: solid; border-right-width: 1">
<p align="center"><font size="1">Bestellen</font></td>
</tr>
<tr>
<td width="16%" height="19" bgcolor="#D5E9F2" align="center" style="border-left-style: solid; border-left-width: 1">
<font size="1">WOLFIN IB</font></td>
<td width="16%" height="19" bgcolor="#D5E9F2" align="center">
<font size="1">1,0*</font></td>
<td width="17%" height="19" bgcolor="#D5E9F2" align="center">
<font size="1">1620</font></td>
<td width="17%" height="19" bgcolor="#D5E9F2" align="center">
<font size="1">20</font></td>
<td width="17%" height="19" bgcolor="#D5E9F2" align="center">
<font size="1">32,40</font></td>
<td width="17%" height="19" bgcolor="#D5E9F2" align="center" style="border-right-style: solid; border-right-width: 1">
<font size="1"><input class="inputc" size="4" name="name"></font></td>
</tr>
<tr>
<td width="16%" height="19" align="center" style="border-left-style: solid; border-left-width: 1">
<font size="1">WOLFIN IB</font></td>
<td width="16%" height="19" align="center"><font size="1">1,2**</font></td>
<td width="17%" height="19" align="center"><font size="1">1100</font></td>
<td width="17%" height="19" align="center"><font size="1">20</font></td>
<td width="17%" height="19" align="center"><font size="1">22,00</font></td>
<td width="17%" height="19" align="center" style="border-right-style: solid; border-right-width: 1">
<font size="1"><input class="inputc" size="4" name="wolfin"></font></td>
</tr>
<tr>
<td width="16%" height="18" bgcolor="#D5E9F2" align="center" style="border-left-style: solid; border-left-width: 1">
<font size="1">WOLFIN IB</font></td>
<td width="16%" height="18" bgcolor="#D5E9F2" align="center">
<font size="1">1,2**</font></td>
<td width="17%" height="18" bgcolor="#D5E9F2" align="center">
<font size="1">1620</font></td>
<td width="17%" height="18" bgcolor="#D5E9F2" align="center">
<font size="1">20</font></td>
<td width="17%" height="18" bgcolor="#D5E9F2" align="center">
<font size="1">32,40</font></td>
<td width="17%" height="18" bgcolor="#D5E9F2" align="center" style="border-right-style: solid; border-right-width: 1"> </td>
</tr>
<tr>
<td width="16%" height="18" align="center" style="border-left-style: solid; border-left-width: 1">
<font size="1">WOLFIN IB</font></td>
<td width="16%" height="18" align="center"><font size="1">1,5</font></td>
<td width="17%" height="18" align="center"><font size="1">1100</font></td>
<td width="17%" height="18" align="center"><font size="1">15</font></td>
<td width="17%" height="18" align="center"><font size="1">16,50</font></td>
<td width="17%" height="18" align="center" style="border-right-style: solid; border-right-width: 1">
</td>
</tr>
<tr>
<td width="16%" height="18" bgcolor="#D5E9F2" align="center" style="border-left-style: solid; border-left-width: 1">
<font size="1">WOLFIN IB</font></td>
<td width="16%" height="18" bgcolor="#D5E9F2" align="center">
<font size="1">1,5</font></td>
<td width="17%" height="18" bgcolor="#D5E9F2" align="center">
<font size="1">1620</font></td>
<td width="17%" height="18" bgcolor="#D5E9F2" align="center">
<font size="1">15</font></td>
<td width="17%" height="18" bgcolor="#D5E9F2" align="center">
<font size="1">24,30</font></td>
<td width="17%" height="18" bgcolor="#D5E9F2" align="center" style="border-right-style: solid; border-right-width: 1"> </td>
</tr>
<tr>
<td width="16%" height="18" align="center" style="border-left-style: solid; border-left-width: 1">
<font size="1">WOLFIN IB</font></td>
<td width="16%" height="18" align="center"><font size="1">2,0</font></td>
<td width="17%" height="18" align="center"><font size="1">1100</font></td>
<td width="17%" height="18" align="center"><font size="1">10</font></td>
<td width="17%" height="18" align="center"><font size="1">11,00</font></td>
<td width="17%" height="18" align="center" style="border-right-style: solid; border-right-width: 1">
</td>
</tr>
<tr>
<td width="16%" height="18" bgcolor="#D5E9F2" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1">
<font size="1">WOLFIN IB</font></td>
<td width="16%" height="18" bgcolor="#D5E9F2" align="center" style="border-bottom-style: solid; border-bottom-width: 1">
<font size="1">2,0</font></td>
<td width="17%" height="18" bgcolor="#D5E9F2" align="center" style="border-bottom-style: solid; border-bottom-width: 1">
<font size="1">1620</font></td>
<td width="17%" height="18" bgcolor="#D5E9F2" align="center" style="border-bottom-style: solid; border-bottom-width: 1">
<font size="1">10</font></td>
<td width="17%" height="18" bgcolor="#D5E9F2" align="center" style="border-bottom-style: solid; border-bottom-width: 1">
<font size="1">16,20</font></td>
<td width="17%" height="18" bgcolor="#D5E9F2" align="center" style="border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1"> </td>
</tr>
</table>
<p> </p>
<div align="center"><center><table bgcolor="#F2F2F2" width="742" cellspacing="6">
<tr>
<td width="119"> </td>
<td width="599"> </td>
</tr>
<tr>
<td align="right" width="119"><small>Your name:</small></td>
<td width="599"><font face="Arial"> </font></td>
</tr>
<tr>
<td align="right" width="119"><small>Wolfin IB</small></td>
<td width="599"><font face="Arial"> </font></td>
</tr>
<tr>
<td align="right" width="119"><font color="#000080" size="1">*</font><small>
Your email address:</small></td>
<td align="left" width="599"><font face="Arial"><input class="inputc" size="50"
name="email">
</font></td>
</tr>
<tr align="middle">
<td align="right" width="119"><font color="#000080" size="1">*</font><small>
Confirm email address:</small></td>
<td width="599" align="left"><font face="Arial"><input class="inputc" size="50"
name="email2">
</font></td>
</tr>
<tr>
<td align="right" width="119"><font color="#000080" size="1">*</font><small>
Subject:</small></td>
<td width="599"><font face="Arial"><input class="inputc" size="60" name="thesubject">
</font></td>
</tr>
<tr>
<td align="right" width="119"> 
<p><font color="#000080" size="1">*</font><small> Your request or query:</small></td>
<td width="599"><textarea style="FONT-SIZE: 10pt" name="themessage" rows="7" cols="60"></textarea></td>
</tr>
<tr>
<td width="119"></td>
<td width="599"><p>
<input type="button" class="button"
value="Send" name="B1" ONCLICK="javascript:validateForm()">
<small> <small>You must fill in the fields marked with a *</p>
</td>
</tr>
</table>
</center></div>
</form>
<script language="JavaScript"><!--
function validateForm()
{
var okSoFar=true
with (document.phpformmailer)
{
var foundAt = email.value.indexOf("@",0)
if (foundAt < 1 && okSoFar)
{
okSoFar = false
alert ("Please enter a valid email address.")
email.focus()
}
var e1 = email.value
var e2 = email2.value
if (!(e1==e2) && okSoFar)
{
okSoFar = false
alert ("Email addresses you entered do not match. Please re-enter.")
email.focus()
}
if (thesubject.value=="" && okSoFar)
{
okSoFar=false
alert("Please enter the subject.")
thesubject.focus()
}
if (themessage.value=="" && okSoFar)
{
okSoFar=false
alert("Please enter the details for your enquiry.")
themessage.focus()
}
if (okSoFar==true) submit();
}
}
// --></script>

</body>
</html>


php

CODE <?php
/* PHP Form Mailer - phpFormMailer v2.2, last updated 23rd Jan 2008 - check back often for updates!
(easy to use and more secure than many cgi form mailers) FREE from:
www.TheDemoSite.co.uk
Should work fine on most Unix/Linux platforms
for a Windows version see: asp.thedemosite.co.uk
*/

// ------- three variables you MUST change below -------------------------------------------------------
$replyemail="post@handwerkstatt.eu";//change to your email address
$valid_ref1="http://www.rosinenbomber-jk.com/contact.html";// chamge "Your--domain" to your domain
$valid_ref2="http://www.rosinenbomber-jk.com/contact.html";// chamge "Your--domain" to your domain
// -------- No changes required below here -------------------------------------------------------------
// email variable not set - load $valid_ref1 page
if (!isset($_POST['email']))
{
echo "<script language=\"JavaScript\"><!--\n ";
echo "top.location.href = \"$valid_ref1\"; \n// --></script>";
exit;
}

$ref_page=$_SERVER["HTTP_REFERER"];
$valid_referrer=0;
if($ref_page==$valid_ref1) $valid_referrer=1;
elseif($ref_page==$valid_ref2) $valid_referrer=1;
if(!$valid_referrer)
{
echo "<script language=\"JavaScript\"><!--\n alert(\"ERROR - not sent.\\n\\nCheck your 'valid_ref1' and 'valid_ref2' are correct within contact_process.php.\");\n";
echo "top.location.href = \"contact.html\"; \n// --></script>";
exit;
}

//check user input for possible header injection attempts!
function is_forbidden($str,$check_all_patterns = true)
{
$patterns[0] = 'content-type:';
$patterns[1] = 'mime-version';
$patterns[2] = 'multipart/mixed';
$patterns[3] = 'Content-Transfer-Encoding';
$patterns[4] = 'to:';
$patterns[5] = 'cc:';
$patterns[6] = 'bcc:';
$forbidden = 0;
for ($i=0; $i<count($patterns); $i++)
{
$forbidden = eregi($patterns[$i], strtolower($str));
if ($forbidden) break;
}
//check for line breaks if checking all patterns
if ($check_all_patterns AND !$forbidden) $forbidden = preg_match("/(%0a|%0d|\\n+|\\r+)/i", $str);
if ($forbidden)
{
echo "<font color=red><center><h3>STOP! Message not sent.</font></h3><br><b>
The text you entered is forbidden, it includes one or more of the following:
<br><textarea rows=9 cols=25>";
foreach ($patterns as $key => $value) echo $value."\n";

exit();
}
else return $str;
}

$name = is_forbidden($_POST["name"]);
$wolfin = is_forbidden($_POST["wolfin"]);
$email = is_forbidden($_POST["email"]);
$thesubject = is_forbidden($_POST["thesubject"]);
$themessage = is_forbidden($_POST["themessage"], false);

$success_sent_msg='<p align="center"><strong> </strong></p>
<p align="center"><strong>Your message has been successfully sent to us<br>
</strong> and we will reply as soon as possible.</p>
<p align="center">A copy of your query has been sent to you.</p>
<p align="center">Thank you for contacting us.</p>';

$replymessage = "Hi $name

Thank you for your email.

We will endeavour to reply to you shortly.

Please DO NOT reply to this email.

Below is a copy of the message you submitted:
--------------------------------------------------
Subject: $thesubject
Query:
$themessage
--------------------------------------------------

Thank you";

$themessage = "name: $name wolfin: $wolfin $themessage";

mail("$replyemail",
"$thesubject",
"$themessage",
"From: $email\nReply-To: $email");
mail("$email",
"Receipt: $thesubject",
"$replymessage",
"From: $replyemail\nReply-To: $replyemail");
echo $success_sent_msg;
/*
PHP Form Mailer - phpFormMailer (easy to use and more secure than many cgi form mailers)
FREE from:

www.TheDemoSite.co.uk */
?>




p.s. was ich hier baue ist nicht gewerblich, sondern soll mir als bestellungshilfe das bestellen erleichtern. kann das so von unterwegs mit dem iphone erledigen!

achja, wenn bei der mail uebermittlung unten noch ein adress block angezeigt werden koennte, waere natuerlich der hammer!!! vielen dank im voraus fuer die hilfe!!!

gruss danny
 
den Zeilenumbruch bekommst Du so hin:
CODE $name = is_forbidden($_POST["name"])."\n";
$wolfin = is_forbidden($_POST["wolfin"])."\n";


und den Betreff änderst Du so im PHP-Script:

CODE
$thesubject ="Bestellung";

 
hallo peter, ich danke dir schonmal fuer deine antwort. beides hat super geklappt, obwohl die e-mail nich so ankommt:

CODE
name: 1
wolfin: 2


also der zweite titel ist etwas eingerueckt, ist nicht so schlimm, waere aber trotzdem cool wenn man es abschalten koennte.
das mit dem betreff hat bestens geklappt!!! aber dennoch wird noch von mir verlangt eine betreff in die vorhandene zeile einzugeben.

gerne moechte ich alle felder ausser name und wolfin erst mal loeschen. im html ist das net so schwer, nur in der php datei bereitet es mir ein paar probleme...

ich danke nochmal im voraus...
danny
 
weiß jetzt nicht ob ich das richtig verstanden hab
rolleyes.gif

versuch mal das:
CODE $themessage = trim("name: $name wolfin: $wolfin $themessage");



Wie stellst Du dir deinen Betreff vor, kappier ich jetzt nicht ?
 
also ich muss irgendwie die felder + das verlangen der pflichteingabe loswerden. dabei handelt es sich um die felder email, betreff und texteingabe.

ich habe bereits alles ein wenig umgebaut:

php:
CODE <?php
/* PHP Form Mailer - phpFormMailer v2.2, last updated 23rd Jan 2008 - check back often for updates!
(easy to use and more secure than many cgi form mailers) FREE from:
www.TheDemoSite.co.uk
Should work fine on most Unix/Linux platforms
for a Windows version see: asp.thedemosite.co.uk
*/

// ------- three variables you MUST change below -------------------------------------------------------
$replyemail="post@handwerkstatt.eu";//change to your email address
$valid_ref1="http://www.rosinenbomber-jk.com/contact.html";// chamge "Your--domain" to your domain
$valid_ref2="http://www.rosinenbomber-jk.com/contact.html";// chamge "Your--domain" to your domain
// -------- No changes required below here -------------------------------------------------------------
// email variable not set - load $valid_ref1 page
if (!isset($_POST['email']))
{
echo "<script language=\"JavaScript\"><!--\n ";
echo "top.location.href = \"$valid_ref1\"; \n// --></script>";
exit;
}

$ref_page=$_SERVER["HTTP_REFERER"];
$valid_referrer=0;
if($ref_page==$valid_ref1) $valid_referrer=1;
elseif($ref_page==$valid_ref2) $valid_referrer=1;
if(!$valid_referrer)
{
echo "<script language=\"JavaScript\"><!--\n alert(\"ERROR - not sent.\\n\\nCheck your 'valid_ref1' and 'valid_ref2' are correct within contact_process.php.\");\n";
echo "top.location.href = \"contact.html\"; \n// --></script>";
exit;
}

//check user input for possible header injection attempts!
function is_forbidden($str,$check_all_patterns = true)
{
$patterns[0] = 'content-type:';
$patterns[1] = 'mime-version';
$patterns[2] = 'multipart/mixed';
$patterns[3] = 'Content-Transfer-Encoding';
$patterns[4] = 'to:';
$patterns[5] = 'cc:';
$patterns[6] = 'bcc:';
$forbidden = 0;
for ($i=0; $i<count($patterns); $i++)
{
$forbidden = eregi($patterns[$i], strtolower($str));
if ($forbidden) break;
}
//check for line breaks if checking all patterns
if ($check_all_patterns AND !$forbidden) $forbidden = preg_match("/(%0a|%0d|\\n+|\\r+)/i", $str);
if ($forbidden)
{
echo "<font color=red><center><h3>STOP! Message not sent.</font></h3><br><b>
The text you entered is forbidden, it includes one or more of the following:
<br><textarea rows=9 cols=25>";
foreach ($patterns as $key => $value) echo $value."\n";

exit();
}
else return $str;
}

$wolfin1 = is_forbidden($_POST["wolfin1"])."\n";
$wolfin2 = is_forbidden($_POST["wolfin2"])."\n";
$Wolfin3 = is_forbidden($_POST["wolfin3"])."\n";
$wolfin4 = is_forbidden($_POST["wolfin4"])."\n";
$email = is_forbidden($_POST["email"]);
$thesubject ="Bestellung";
$themessage = is_forbidden($_POST["themessage"], false);

$success_sent_msg='<p align="center"><strong> </strong></p>
<p align="center"><strong>Your message has been successfully sent to us<br>
</strong> and we will reply as soon as possible.</p>
<p align="center">A copy of your query has been sent to you.</p>
<p align="center">Thank you for contacting us.</p>';

$replymessage = "Hi $name

Thank you for your email.

We will endeavour to reply to you shortly.

Please DO NOT reply to this email.

Below is a copy of the message you submitted:
--------------------------------------------------
Subject: $thesubject
Query:
$themessage
--------------------------------------------------

Thank you";

$themessage = "WOLFIN IB - 1,0mm - 1622mm - 20m - schwarz: $wolfin1
WOLFIN IB - 1,2mm - 1100mm - 20m - schwarz: $wolfin2
WOLFIN IB - 1,2mm - 1620mm - 20m - schwarz: $wolfin3
WOLFIN IB - 1,5mm - 1100mm - 15m - schwarz: $wolfin4
WOLFIN IB - 1,5mm - 1620mm - 15m - schwarz: $wolfin5
WOLFIN IB - 2,0mm - 1100mm - 10m - schwarz: $wolfin6
WOLFIN IB - 2,0mm - 1620mm - 10m - schwarz: $wolfin7";

mail("$replyemail",
"$thesubject",
"$themessage",
"From: $email\nReply-To: $email");
mail("$email",
"Receipt: $thesubject",
"$replymessage",
"From: $replyemail\nReply-To: $replyemail");
echo $success_sent_msg;
/*
PHP Form Mailer - phpFormMailer (easy to use and more secure than many cgi form mailers)
FREE from:

www.TheDemoSite.co.uk */
?>




html:

CODE
<html>

<head>
<meta http-equiv="Content-Language" content="de">

<title></title>
<style>
BODY{color:#000000; font-size: 8pt; font-family: Verdana}
.button {background-color: rgb(128,128,128); color:#ffffff; font-size: 8pt;}
.inputc {font-size: 8pt;}
.style3 {font-size: xx-small}
</style>
</head>

<body topmargin="0" leftmargin="0">

<form name="phpformmailer" action="contact_process.php" align="center" method="post">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="45%" id="AutoNumber1" height="189">
<tr>
<td width="100%" colspan="6" align="center" bgcolor="#60BB46" height="20" style="border-style: solid; border-width: 1">
<b><font size="2" color="#FFFFFF">WOLFIN IB LIEFERPROGRAMM</font></b></td>
</tr>
<tr>
<td width="100%" colspan="6" align="center" height="20" bgcolor="#D5E9F2" style="border-right-style: solid; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1">
<div style="border-left-style: solid; border-left-width: 1; padding-left: 4">
<b><font size="2">WOLFIN IB-Bahnen, schwarz</font></b></div>
</td>
</tr>
<tr>
<td width="16%" height="34" align="center" style="border-left-style: solid; border-left-width: 1; border-top-style: solid; border-top-width: 1">
<font size="1">Produkt-<br>
bezeichnung</font></td>
<td width="16%" height="34" align="center"><font size="1">Dicke<br>
mm</font></td>
<td width="17%" height="34" align="center"><font size="1">Breite<br>
mm</font></td>
<td width="17%" height="34" align="center"><font size="1">Länge<br>
m</font></td>
<td width="17%" height="34" align="center"><font size="1">
<span style="font-weight: 400">Fläche<br>
m2</span></font></td>
<td width="17%" height="34" align="center" style="border-right-style: solid; border-right-width: 1">
<p align="center"><font size="1">Bestellen</font></td>
</tr>
<tr>
<td width="16%" height="19" bgcolor="#D5E9F2" align="center" style="border-left-style: solid; border-left-width: 1">
<font size="1">WOLFIN IB</font></td>
<td width="16%" height="19" bgcolor="#D5E9F2" align="center">
<font size="1">1,0*</font></td>
<td width="17%" height="19" bgcolor="#D5E9F2" align="center">
<font size="1">1620</font></td>
<td width="17%" height="19" bgcolor="#D5E9F2" align="center">
<font size="1">20</font></td>
<td width="17%" height="19" bgcolor="#D5E9F2" align="center">
<font size="1">32,40</font></td>
<td width="17%" height="19" bgcolor="#D5E9F2" align="center" style="border-right-style: solid; border-right-width: 1">
<font size="1"><input class="inputc" size="4" name="wolfin1"></font></td>
</tr>
<tr>
<td width="16%" height="19" align="center" style="border-left-style: solid; border-left-width: 1">
<font size="1">WOLFIN IB</font></td>
<td width="16%" height="19" align="center"><font size="1">1,2**</font></td>
<td width="17%" height="19" align="center"><font size="1">1100</font></td>
<td width="17%" height="19" align="center"><font size="1">20</font></td>
<td width="17%" height="19" align="center"><font size="1">22,00</font></td>
<td width="17%" height="19" align="center" style="border-right-style: solid; border-right-width: 1">
<font size="1"><input class="inputc" size="4" name="wolfin2"></font></td>
</tr>
<tr>
<td width="16%" height="18" bgcolor="#D5E9F2" align="center" style="border-left-style: solid; border-left-width: 1">
<font size="1">WOLFIN IB</font></td>
<td width="16%" height="18" bgcolor="#D5E9F2" align="center">
<font size="1">1,2**</font></td>
<td width="17%" height="18" bgcolor="#D5E9F2" align="center">
<font size="1">1620</font></td>
<td width="17%" height="18" bgcolor="#D5E9F2" align="center">
<font size="1">20</font></td>
<td width="17%" height="18" bgcolor="#D5E9F2" align="center">
<font size="1">32,40</font></td>
<td width="17%" height="18" bgcolor="#D5E9F2" align="center" style="border-right-style: solid; border-right-width: 1">
<font size="1"><input class="inputc" size="4" name="wolfin3"></font></td>
</tr>
<tr>
<td width="16%" height="18" align="center" style="border-left-style: solid; border-left-width: 1">
<font size="1">WOLFIN IB</font></td>
<td width="16%" height="18" align="center"><font size="1">1,5</font></td>
<td width="17%" height="18" align="center"><font size="1">1100</font></td>
<td width="17%" height="18" align="center"><font size="1">15</font></td>
<td width="17%" height="18" align="center"><font size="1">16,50</font></td>
<td width="17%" height="18" align="center" style="border-right-style: solid; border-right-width: 1">
<font size="1"><input class="inputc" size="4" name="wolfin4"></font></td>
</tr>
<tr>
<td width="16%" height="18" bgcolor="#D5E9F2" align="center" style="border-left-style: solid; border-left-width: 1">
<font size="1">WOLFIN IB</font></td>
<td width="16%" height="18" bgcolor="#D5E9F2" align="center">
<font size="1">1,5</font></td>
<td width="17%" height="18" bgcolor="#D5E9F2" align="center">
<font size="1">1620</font></td>
<td width="17%" height="18" bgcolor="#D5E9F2" align="center">
<font size="1">15</font></td>
<td width="17%" height="18" bgcolor="#D5E9F2" align="center">
<font size="1">24,30</font></td>
<td width="17%" height="18" bgcolor="#D5E9F2" align="center" style="border-right-style: solid; border-right-width: 1">
<font size="1"><input class="inputc" size="4" name="wolfin5"></font></td>
</tr>
<tr>
<td width="16%" height="18" align="center" style="border-left-style: solid; border-left-width: 1">
<font size="1">WOLFIN IB</font></td>
<td width="16%" height="18" align="center"><font size="1">2,0</font></td>
<td width="17%" height="18" align="center"><font size="1">1100</font></td>
<td width="17%" height="18" align="center"><font size="1">10</font></td>
<td width="17%" height="18" align="center"><font size="1">11,00</font></td>
<td width="17%" height="18" align="center" style="border-right-style: solid; border-right-width: 1">
<font size="1"><input class="inputc" size="4" name="wolfin6"></font></td>
</tr>
<tr>
<td width="16%" height="18" bgcolor="#D5E9F2" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1">
<font size="1">WOLFIN IB</font></td>
<td width="16%" height="18" bgcolor="#D5E9F2" align="center" style="border-bottom-style: solid; border-bottom-width: 1">
<font size="1">2,0</font></td>
<td width="17%" height="18" bgcolor="#D5E9F2" align="center" style="border-bottom-style: solid; border-bottom-width: 1">
<font size="1">1620</font></td>
<td width="17%" height="18" bgcolor="#D5E9F2" align="center" style="border-bottom-style: solid; border-bottom-width: 1">
<font size="1">10</font></td>
<td width="17%" height="18" bgcolor="#D5E9F2" align="center" style="border-bottom-style: solid; border-bottom-width: 1">
<font size="1">16,20</font></td>
<td width="17%" height="18" bgcolor="#D5E9F2" align="center" style="border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1">
<font size="1"><input class="inputc" size="4" name="wolfin7"></font></td>
</tr>
</table>
<p> </p>
<div align="center"><center><table bgcolor="#F2F2F2" width="742" cellspacing="6">
<tr>
<td width="119"> </td>
<td width="599"> </td>
</tr>
<tr>
<td align="right" width="119"><small>Your name:</small></td>
<td width="599"><font face="Arial"> </font></td>
</tr>
<tr>
<td align="right" width="119"><small>Wolfin IB</small></td>
<td width="599"><font face="Arial"> </font></td>
</tr>
<tr>
<td align="right" width="119"><font color="#000080" size="1">*</font><small>
Your email address:</small></td>
<td align="left" width="599"><font face="Arial"><input class="inputc" size="50"
name="email">
</font></td>
</tr>
<tr align="middle">
<td align="right" width="119"><font color="#000080" size="1">*</font><small>
Confirm email address:</small></td>
<td width="599" align="left"><font face="Arial"><input class="inputc" size="50"
name="email2">
</font></td>
</tr>
<tr>
<td align="right" width="119"><font color="#000080" size="1">*</font><small>
Subject:</small></td>
<td width="599"><font face="Arial"><input class="inputc" size="60" name="thesubject">
</font></td>
</tr>
<tr>
<td align="right" width="119"> 
<p><font color="#000080" size="1">*</font><small> Your request or query:</small></td>
<td width="599"><textarea style="FONT-SIZE: 10pt" name="themessage" rows="7" cols="60"></textarea></td>
</tr>
<tr>
<td width="119"></td>
<td width="599"><p>
<input type="button" class="button"
value="Send" name="B1" ONCLICK="javascript:validateForm()">
<small> <small>You must fill in the fields marked with a *</p>
</td>
</tr>
</table>
</center></div>
</form>
<script language="JavaScript"><!--
function validateForm()
{
var okSoFar=true
with (document.phpformmailer)
{
var foundAt = email.value.indexOf("@",0)
if (foundAt < 1 && okSoFar)
{
okSoFar = false
alert ("Please enter a valid email address.")
email.focus()
}
var e1 = email.value
var e2 = email2.value
if (!(e1==e2) && okSoFar)
{
okSoFar = false
alert ("Email addresses you entered do not match. Please re-enter.")
email.focus()
}
if (thesubject.value=="" && okSoFar)
{
okSoFar=false
alert("Please enter the subject.")
thesubject.focus()
}
if (themessage.value=="" && okSoFar)
{
okSoFar=false
alert("Please enter the details for your enquiry.")
themessage.focus()
}
if (okSoFar==true) submit();
}
}
// --></script>

</body>
</html>


vielen dank!!!
 
Dann mußt du die Funktion 'validateForm()' ausschalten. Dann wird nichts mehr angefragt. Zumindest Clientseitig
CODE <input type="button" class="button" value="Send" name="B1" ONCLICK="javascript:validateForm()">

und zwar so

CODE <input type="submt" class="button" value="Send" name="B1">


Versuch das jetzt mal:

CODE <html>

<head>
<meta http-equiv="Content-Language" content="de">

<title></title>
<style>
BODY{color:#000000; font-size: 8pt; font-family: Verdana}
.button {background-color: rgb(128,128,128); color:#ffffff; font-size: 8pt;}
.inputc {font-size: 8pt;}
.style3 {font-size: xx-small}
</style>
</head>

<body topmargin="0" leftmargin="0">

<form name="phpformmailer" action="contact_process.php" align="center" method="post">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="45%" id="AutoNumber1" height="189">
  <tr>
    <td width="100%" colspan="6" align="center" bgcolor="#60BB46" height="20" style="border-style: solid; border-width: 1">
    <b><font size="2" color="#FFFFFF">WOLFIN IB LIEFERPROGRAMM</font></b></td>
  </tr>
  <tr>
    <td width="100%" colspan="6" align="center" height="20" bgcolor="#D5E9F2" style="border-right-style: solid; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1">
    <div style="border-left-style: solid; border-left-width: 1; padding-left: 4">
      <b><font size="2">WOLFIN IB-Bahnen, schwarz</font></b></div>
    </td>
  </tr>
  <tr>
    <td width="16%" height="34" align="center" style="border-left-style: solid; border-left-width: 1; border-top-style: solid; border-top-width: 1">
    <font size="1">Produkt-<br>
    bezeichnung</font></td>
    <td width="16%" height="34" align="center"><font size="1">Dicke<br>
    mm</font></td>
    <td width="17%" height="34" align="center"><font size="1">Breite<br>
    mm</font></td>
    <td width="17%" height="34" align="center"><font size="1">Länge<br>
    m</font></td>
    <td width="17%" height="34" align="center"><font size="1">
    <span style="font-weight: 400">Fläche<br>
    m2</span></font></td>
    <td width="17%" height="34" align="center" style="border-right-style: solid; border-right-width: 1">
    <p align="center"><font size="1">Bestellen</font></td>
  </tr>
  <tr>
    <td width="16%" height="19" bgcolor="#D5E9F2" align="center" style="border-left-style: solid; border-left-width: 1">
    <font size="1">WOLFIN IB</font></td>
    <td width="16%" height="19" bgcolor="#D5E9F2" align="center">
    <font size="1">1,0*</font></td>
    <td width="17%" height="19" bgcolor="#D5E9F2" align="center">
    <font size="1">1620</font></td>
    <td width="17%" height="19" bgcolor="#D5E9F2" align="center">
    <font size="1">20</font></td>
    <td width="17%" height="19" bgcolor="#D5E9F2" align="center">
    <font size="1">32,40</font></td>
    <td width="17%" height="19" bgcolor="#D5E9F2" align="center" style="border-right-style: solid; border-right-width: 1">
    <font size="1"><input class="inputc" size="4" name="wolfin1"></font></td>
  </tr>
  <tr>
    <td width="16%" height="19" align="center" style="border-left-style: solid; border-left-width: 1">
    <font size="1">WOLFIN IB</font></td>
    <td width="16%" height="19" align="center"><font size="1">1,2**</font></td>
    <td width="17%" height="19" align="center"><font size="1">1100</font></td>
    <td width="17%" height="19" align="center"><font size="1">20</font></td>
    <td width="17%" height="19" align="center"><font size="1">22,00</font></td>
    <td width="17%" height="19" align="center" style="border-right-style: solid; border-right-width: 1">
    <font size="1"><input class="inputc" size="4" name="wolfin2"></font></td>
  </tr>
  <tr>
    <td width="16%" height="18" bgcolor="#D5E9F2" align="center" style="border-left-style: solid; border-left-width: 1">
    <font size="1">WOLFIN IB</font></td>
    <td width="16%" height="18" bgcolor="#D5E9F2" align="center">
    <font size="1">1,2**</font></td>
    <td width="17%" height="18" bgcolor="#D5E9F2" align="center">
    <font size="1">1620</font></td>
    <td width="17%" height="18" bgcolor="#D5E9F2" align="center">
    <font size="1">20</font></td>
    <td width="17%" height="18" bgcolor="#D5E9F2" align="center">
    <font size="1">32,40</font></td>
    <td width="17%" height="18" bgcolor="#D5E9F2" align="center" style="border-right-style: solid; border-right-width: 1">
    <font size="1"><input class="inputc" size="4" name="wolfin3"></font></td>
  </tr>
  <tr>
    <td width="16%" height="18" align="center" style="border-left-style: solid; border-left-width: 1">
    <font size="1">WOLFIN IB</font></td>
    <td width="16%" height="18" align="center"><font size="1">1,5</font></td>
    <td width="17%" height="18" align="center"><font size="1">1100</font></td>
    <td width="17%" height="18" align="center"><font size="1">15</font></td>
    <td width="17%" height="18" align="center"><font size="1">16,50</font></td>
    <td width="17%" height="18" align="center" style="border-right-style: solid; border-right-width: 1">
    <font size="1"><input class="inputc" size="4" name="wolfin4"></font></td>
  </tr>
  <tr>
    <td width="16%" height="18" bgcolor="#D5E9F2" align="center" style="border-left-style: solid; border-left-width: 1">
    <font size="1">WOLFIN IB</font></td>
    <td width="16%" height="18" bgcolor="#D5E9F2" align="center">
    <font size="1">1,5</font></td>
    <td width="17%" height="18" bgcolor="#D5E9F2" align="center">
    <font size="1">1620</font></td>
    <td width="17%" height="18" bgcolor="#D5E9F2" align="center">
    <font size="1">15</font></td>
    <td width="17%" height="18" bgcolor="#D5E9F2" align="center">
    <font size="1">24,30</font></td>
    <td width="17%" height="18" bgcolor="#D5E9F2" align="center" style="border-right-style: solid; border-right-width: 1">
    <font size="1"><input class="inputc" size="4" name="wolfin5"></font></td>
  </tr>
  <tr>
    <td width="16%" height="18" align="center" style="border-left-style: solid; border-left-width: 1">
    <font size="1">WOLFIN IB</font></td>
    <td width="16%" height="18" align="center"><font size="1">2,0</font></td>
    <td width="17%" height="18" align="center"><font size="1">1100</font></td>
    <td width="17%" height="18" align="center"><font size="1">10</font></td>
    <td width="17%" height="18" align="center"><font size="1">11,00</font></td>
    <td width="17%" height="18" align="center" style="border-right-style: solid; border-right-width: 1">
    <font size="1"><input class="inputc" size="4" name="wolfin6"></font></td>
  </tr>
  <tr>
    <td width="16%" height="18" bgcolor="#D5E9F2" align="center" style="border-left-style: solid; border-left-width: 1; border-bottom-style: solid; border-bottom-width: 1">
    <font size="1">WOLFIN IB</font></td>
    <td width="16%" height="18" bgcolor="#D5E9F2" align="center" style="border-bottom-style: solid; border-bottom-width: 1">
    <font size="1">2,0</font></td>
    <td width="17%" height="18" bgcolor="#D5E9F2" align="center" style="border-bottom-style: solid; border-bottom-width: 1">
    <font size="1">1620</font></td>
    <td width="17%" height="18" bgcolor="#D5E9F2" align="center" style="border-bottom-style: solid; border-bottom-width: 1">
    <font size="1">10</font></td>
    <td width="17%" height="18" bgcolor="#D5E9F2" align="center" style="border-bottom-style: solid; border-bottom-width: 1">
    <font size="1">16,20</font></td>
    <td width="17%" height="18" bgcolor="#D5E9F2" align="center" style="border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1">
    <font size="1"><input class="inputc" size="4" name="wolfin7"></font></td>
  </tr>
</table>
<p>
<input type="submit" class="button" value="Send" name="B1">
</p>
</form>
<script language="JavaScript"><!--
function validateForm()
{
var okSoFar=true
with (document.phpformmailer)
{
var foundAt = email.value.indexOf("@",0)
if (foundAt < 1 && okSoFar)
{
  okSoFar = false
  alert ("Please enter a valid email address.")
  email.focus()
}
var e1 = email.value
var e2 = email2.value
if (!(e1==e2) && okSoFar)
{
  okSoFar = false
  alert ("Email addresses you entered do not match.  Please re-enter.")
  email.focus()
}
if (thesubject.value=="" && okSoFar)
{
  okSoFar=false
  alert("Please enter the subject.")
  thesubject.focus()
}
if (themessage.value=="" && okSoFar)
{
  okSoFar=false
  alert("Please enter the details for your enquiry.")
  themessage.focus()
}
if (okSoFar==true)  submit();
}
}
// --></script>

</body>
</html>
 
irgrendwie klappt das auch nicht so wirklich :-(

der gibt mir unten in der statusleiste "fehler" aus...

aber optisch sieht es so aus wie ich es mir vorstelle
smile.gif
 
diese Zeile mußt Du autauschen:
CODE <input type="button" class="button" value="Send" name="B1" ONCLICK="javascript:validateForm()">

in:

CODE <input type="submit" class="button" value="Send" name="B1">


 
jetzt habe ich nur das problem, jetzt zeigt er keinen fehler mehr an, schickt aber auch keine mail mehr an mich!

beim absenden, werden alle felder leer, aber es kommt keine mail an :-(

ich denke das jetzt die php datei probleme macht weil felder fehlen usw. oder?

CODE <?php
/* PHP Form Mailer - phpFormMailer v2.2, last updated 23rd Jan 2008 - check back often for updates!
(easy to use and more secure than many cgi form mailers) FREE from:
www.TheDemoSite.co.uk
Should work fine on most Unix/Linux platforms
for a Windows version see: asp.thedemosite.co.uk
*/

// ------- three variables you MUST change below -------------------------------------------------------
$replyemail="post@handwerkstatt.eu";//change to your email address
$valid_ref1="http://www.rosinenbomber-jk.com/contact.html";// chamge "Your--domain" to your domain
$valid_ref2="http://www.rosinenbomber-jk.com/contact.html";// chamge "Your--domain" to your domain
// -------- No changes required below here -------------------------------------------------------------
// email variable not set - load $valid_ref1 page
if (!isset($_POST['email']))
{
echo "<script language=\"JavaScript\"><!--\n ";
echo "top.location.href = \"$valid_ref1\"; \n// --></script>";
exit;
}

$ref_page=$_SERVER["HTTP_REFERER"];
$valid_referrer=0;
if($ref_page==$valid_ref1) $valid_referrer=1;
elseif($ref_page==$valid_ref2) $valid_referrer=1;
if(!$valid_referrer)
{
echo "<script language=\"JavaScript\"><!--\n alert(\"ERROR - not sent.\\n\\nCheck your 'valid_ref1' and 'valid_ref2' are correct within contact_process.php.\");\n";
echo "top.location.href = \"contact.html\"; \n// --></script>";
exit;
}

//check user input for possible header injection attempts!
function is_forbidden($str,$check_all_patterns = true)
{
$patterns[0] = 'content-type:';
$patterns[1] = 'mime-version';
$patterns[2] = 'multipart/mixed';
$patterns[3] = 'Content-Transfer-Encoding';
$patterns[4] = 'to:';
$patterns[5] = 'cc:';
$patterns[6] = 'bcc:';
$forbidden = 0;
for ($i=0; $i<count($patterns); $i++)
{
$forbidden = eregi($patterns[$i], strtolower($str));
if ($forbidden) break;
}
//check for line breaks if checking all patterns
if ($check_all_patterns AND !$forbidden) $forbidden = preg_match("/(%0a|%0d|\\n+|\\r+)/i", $str);
if ($forbidden)
{
echo "<font color=red><center><h3>STOP! Message not sent.</font></h3><br><b>
The text you entered is forbidden, it includes one or more of the following:
<br><textarea rows=9 cols=25>";
foreach ($patterns as $key => $value) echo $value."\n";
exit();
}
else return $str;
}

$wolfin1 = is_forbidden($_POST["wolfin1"])."\n";
$wolfin2 = is_forbidden($_POST["wolfin2"])."\n";
$Wolfin3 = is_forbidden($_POST["wolfin3"])."\n";
$wolfin4 = is_forbidden($_POST["wolfin4"])."\n";
$email = is_forbidden($_POST["email"]);
$thesubject ="Bestellung";
$themessage = is_forbidden($_POST["themessage"], false);

$success_sent_msg='<p align="center"><strong> </strong></p>
<p align="center"><strong>Your message has been successfully sent to us<br>
</strong> and we will reply as soon as possible.</p>
<p align="center">A copy of your query has been sent to you.</p>
<p align="center">Thank you for contacting us.</p>';

$replymessage = "Hi $name

Thank you for your email.

We will endeavour to reply to you shortly.

Please DO NOT reply to this email.

Below is a copy of the message you submitted:
--------------------------------------------------
Subject: $thesubject
Query:
$themessage
--------------------------------------------------

Thank you";

$themessage = "WOLFIN IB - 1,0mm - 1622mm - 20m - schwarz: $wolfin1
WOLFIN IB - 1,2mm - 1100mm - 20m - schwarz: $wolfin2
WOLFIN IB - 1,2mm - 1620mm - 20m - schwarz: $wolfin3
WOLFIN IB - 1,5mm - 1100mm - 15m - schwarz: $wolfin4
WOLFIN IB - 1,5mm - 1620mm - 15m - schwarz: $wolfin5
WOLFIN IB - 2,0mm - 1100mm - 10m - schwarz: $wolfin6
WOLFIN IB - 2,0mm - 1620mm - 10m - schwarz: $wolfin7";

mail("$replyemail",
"$thesubject",
"$themessage",
"From: $email\nReply-To: $email");
mail("$email",
"Receipt: $thesubject",
"$replymessage",
"From: $replyemail\nReply-To: $replyemail");
echo $success_sent_msg;
/*
PHP Form Mailer - phpFormMailer (easy to use and more secure than many cgi form mailers)
FREE from:

www.TheDemoSite.co.uk */
?>
 
dann füge das mal an den Anfang vom PHP-Script ein
CODE $_POST["email"] = "deine@mail.de";
$_POST["themessage"] = "";
$_POST["name"] = "";
$_POST["thesubject"] = "";
 
danke erstmal phan, aber kannst du mir genauer definieren wo der angfang des scriptes ist? oberhalb des scriptes ist meine mailadresse bereits einmal angegeben, ersetzen, loeschen oder stehen lassen? wohin genau kommen die 4 zeilen? danke!!!!!!!!!!!!!!!!!!!!!!!
 
Der Code kommt nach dem <?php rein.
Den Rest solltes Du durch ausprobieren rausbekommen. Zur Not ist halt dein eMail 2 Mal deklariert
 
vielen dank nochmal phan,

funktionell ist jetzt alles bestens!!!!
nur eine kleine schoenheitskorrekturfrage habe ich noch,
wenn meine mail bei mir ankommt, dann sieht der text so aus:

CODE
WOLFIN IB - 1,0mm - 1622mm - 20m - schwarz: 1

WOLFIN IB - 1,2mm - 1100mm - 20m - schwarz: 1

WOLFIN IB - 1,2mm - 1620mm - 20m - schwarz: 2
WOLFIN IB - 1,5mm - 1100mm - 15m - schwarz: 4

WOLFIN IB - 1,5mm - 1620mm - 15m - schwarz: 1
WOLFIN IB - 2,0mm - 1100mm - 10m - schwarz:
WOLFIN IB - 2,0mm - 1620mm - 10m - schwarz:



also voellig ungeordnet, das ist ein wenig bloed, das sollte schon ungefaehr so aussehen:


CODE
WOLFIN IB - 1,0mm - 1622mm - 20m - schwarz: 1
WOLFIN IB - 1,2mm - 1100mm - 20m - schwarz: 1
WOLFIN IB - 1,2mm - 1620mm - 20m - schwarz: 2
WOLFIN IB - 1,5mm - 1100mm - 15m - schwarz: 4
WOLFIN IB - 1,5mm - 1620mm - 15m - schwarz: 1
WOLFIN IB - 2,0mm - 1100mm - 10m - schwarz:
WOLFIN IB - 2,0mm - 1620mm - 10m - schwarz:




so waere noch besser:


CODE
WOLFIN IB - 1,0mm - 1622mm - 20m - schwarz: 1
WOLFIN IB - 1,2mm - 1100mm - 20m - schwarz: 1
WOLFIN IB - 1,2mm - 1620mm - 20m - schwarz: 2
WOLFIN IB - 1,5mm - 1100mm - 15m - schwarz: 4
WOLFIN IB - 1,5mm - 1620mm - 15m - schwarz: 1
WOLFIN IB - 2,0mm - 1100mm - 10m - schwarz:
WOLFIN IB - 2,0mm - 1620mm - 10m - schwarz:


Mit feundlichen Grüssen Danny Lettkemann
Strasse
PLZ usw.





das war es auch schon, super vielen dank fuer eure hilfe, das war wieder einmal super!!!!! liebe gruesse aus frankfurt!!!
 
Zurück
Oben