S
SameX
Also leute habe ein dickes prob.
ich hatte ein Formular mailer
den proggrammierte ich um in Formular als PHP datei speichern
so
aber was er speichert das brauch ich nicht er soll PHP schreiben aber wie?
also hier das formular :
------------------------------------
Und hier der Datei speicherer :
Wenn ich sende kommt in die PHP datei folgendes :
Clanpage : der text
usw.
so ich möchte das in der PHP datei folgendes steht :
und nicht nur einen also mehrere
ich habe schon versucht $CLN =''; irgendwohin zu quetschen im Formular hat aber nie geklappt
und den Wort CLANPAGE der sollte auch nicht in der PHP datei stehen
Ich brauche dringend hilfe
ich bedanke mih schon im vorraus für jede einzelnen beitrags.
ich hatte ein Formular mailer
den proggrammierte ich um in Formular als PHP datei speichern
so
aber was er speichert das brauch ich nicht er soll PHP schreiben aber wie?
also hier das formular :
Code:
<form name="anmelden" method="post" action="wars2.php">
<input type="hidden" name="erforderlich" value="ClanName,ClanTag,ClanPage,Map,-on-,Stunde,min,tag,monat,jahr,Email,ICQ">
<input type="hidden" name="fehler" value="error1.htm">
<input type="hidden" name="weiterleitung" value="thankyou.htm">
<input type="hidden" name="empfaenger" value="tigersunited@gmx.de">
<input type="hidden" name="Betreff" value="Fight">
<input type="hidden" name="autoantwort" value="true">
<input type="hidden" name="autoantwortbetreff" value="Erfolgreiche Buchung">
<div align="center"><center><table
border="0" width="100%" cellpadding="0" cellspacing="0" align="center">
<tr>
<td>Datum</font></td>
<td><font face="Verdana"><input type="text" name="Clanname" size="20" value=""></font></small></td>
</tr>
<tr>
<td>Clantag:</font></small></td>
<td><input type="text" name="ClanTag" size="20"></font></small></td>
</tr>
<tr>
<td>ClanPage:</font></small></td>
<td><input type="text" name="ClanPage" size="20" value="http://"></font></small></td>
</tr>
<tr>
<td class="schrift10">Map:</td>
<td><select name="Map" class="sel">
<option>de_dust</option><option>de_aztec</option><option>de_train</option><option>de_prodigy</option>
</tr>
<tr>
<td><hr>
</td>
<td><hr>
</td>
</tr>
<tr>
<td class="schrift10">XonX:</td>
<td><select name="-on-" class="sel">
<option>2on2 FW</option><option>2on2 CW</option><option>3on3 FW</option><option>3on3 CW</option><option>5on5 FW</option><option>5on5 CW</option>
</tr>
<tr>
<td class="schrift10">Uhrzeit:</td><td><input size="1" maxLength="2" type="text" name="Stunde" class="jufufield" value="">:
<input size="1" maxLength="2" type="text" name="min" class="jufufield" value=""><span class="schrift10"></span>
</tr>
<tr>
<td class="schrift10">Datum:</td><td><input size="1" maxLength="2" type="text" name="tag" class="jufufield" value="">.
<input size="1" maxLength="2" type="text" name="monat" class="jufufield" value=""><span class="schrift10">.</span>
<input size="3" maxLength="4" type="text" name="jahr" class="jufufield" value=""><span class="schrift10">
</tr>
<tr>
<td>Email:</font></small></td>
<td><input type="text" name="Email" size="30"></font></small></td>
</tr>
<tr>
<td><hr>
</td>
<td><hr>
</td>
</tr>
<tr>
<td valign="top">ICQ:</font></small></td>
<td><input type="text" name="ICQ" size="30" ></textarea></font></small></td></textarea>
</tr>
<tr>
<td></font></small></td>
<td><input type="submit" value="senden"></font></small></td>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
</table>
</center></div>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
</center></div></td>
</tr>
</table>
</div>
Und hier der Datei speicherer :
PHP:
<?php
$erforderlich = explode (",", strtolower($erforderlich));
$werte = array("erforderlich","fehler","weiterleitung","betreff","empfaenger","autoantwort","autoantwortbetreff");
while (list($key, $val) = each($HTTP_POST_VARS))
{
if(in_array(strtolower($key),$erforderlich) AND $val=="") {
header("Location: $fehler");
exit;
}
if(!in_array(strtolower($key), $werte)) {
$mailtext .= sprintf("%-19s: %s\n",$key,$val);
}}
//echo "<pre>$mailtext</pre>";
//exit;
$filename = 'test.php';
$somecontent = "$mailtext";
// Let's make sure the file exists and is writable first.
if (is_writable($filename)) {
// In our example we're opening $filename in append mode.
// The file pointer is at the bottom of the file hence
// that's where $somecontent will go when we fwrite() it.
if (!$handle = fopen($filename, 'a')) {
echo "Cannot open file ($filename)";
exit;
}
// Write $somecontent to our opened file.
if (fwrite($handle, $somecontent) === FALSE) {
echo "Cannot write to file ($filename)";
exit;
}
echo "";
fclose($handle);
} else {
echo "The file $filename is not writable";
}
?>
<html><head>
<meta http-equiv="refresh" content="0;URL=<? echo"$weiterleitung"; ?>">
</head><body></body></html>
Wenn ich sende kommt in die PHP datei folgendes :
Clanpage : der text
usw.
so ich möchte das in der PHP datei folgendes steht :
Code:
<?php
$CLN ='der text';
?>
und nicht nur einen also mehrere
ich habe schon versucht $CLN =''; irgendwohin zu quetschen im Formular hat aber nie geklappt
und den Wort CLANPAGE der sollte auch nicht in der PHP datei stehen
Ich brauche dringend hilfe
ich bedanke mih schon im vorraus für jede einzelnen beitrags.
Zuletzt bearbeitet von einem Moderator: