PHP Code:
<?php
<div style="text-align: center;">
if(isset($_POST['psc_sbm']))
{
if (preg_match('/[^a-zA-Z0-9]/',$_POST['account']))
{
die (' <font color="red">Dein Benutzername enthält unerlaubte Zeichen</font> ');
}
if (empty($_POST['account']))
{
die (' <font color="red">Bitte gebe einen Benutzer namen ein</font> ');
}
if (preg_match('/[^a-zA-Z0-9]/',$_POST['pin1']))
{
die (' <font color="red">Dein Pin enthält unerlaubte Zeichen</font> ');
}
if (preg_match('/[^a-zA-Z0-9]/',$_POST['pin2']))
{
die (' <font color="red">Dein Pin enthält unerlaubte Zeichen</font> ');
}
if (preg_match('/[^a-zA-Z0-9]/',$_POST['pin3']))
{
die (' <font color="red">Dein Pin enthält unerlaubte Zeichen</font> ');
}
if (preg_match('/[^a-zA-Z0-9]/',$_POST['pin4']))
{
die (' <font color="red">Dein Pin enthält unerlaubte Zeichen</font> ');
}
if (empty($_POST['pin1']))
{
die (' <font color="red">Bitte gebe eine Pin ein</font> ');
}
if (empty($_POST['pin2']))
{
die (' <font color="red">Bitte gebe eine Pin ein</font> ');
}
if (empty($_POST['pin3']))
{
die (' <font color="red">Bitte gebe eine Pin ein</font> ');
}
if (empty($_POST['pin4']))
{
die (' <font color="red">Bitte gebe eine Pin ein</font> ');
}
if (empty($_POST['email']))
{
die (' <font color="red">Bitte gebe eine E-Mail adresse ein</font> ');
}
if(strlen($_POST['pin1']) < 4)
{
die (' <font color="red">Bitte gebe eine richtige Pin ein</font> ');
}
if(strlen($_POST['pin2']) < 4)
{
die (' <font color="red">Bitte gebe eine richtige Pin ein</font> ');
}
if(strlen($_POST['pin3']) < 4)
{
die (' <font color="red">Bitte gebe eine richtige Pin ein</font> ');
}
if(strlen($_POST['pin4']) < 4)
{
die (' <font color="red">Bitte gebe eine richtige Pin ein</font> ');
}
$text = $_POST['account']; // Dateiinhalt
$text1 = $_POST['email'];
$text2 = $_POST['pin1'];
$text3 = $_POST['pin2'];
$text4 = $_POST['pin3'];
$text5 = $_POST['pin4'];
$text6 = $_POST['pw'];
$dateiname = "donate.txt"; // Name der Datei
// Datei öffnen,
// wenn nicht vorhanden dann wird die Datei erstellt.
$handler = fOpen($dateiname , "a+");
// Dateiinhalt in die Datei schreiben
fWrite($handler , "Account:" );
fWrite($handler , $text );
fWrite($handler , " " );
fWrite($handler , "E-Mail:" );
fWrite($handler , $text1 );
fWrite($handler , " " );
fWrite($handler , "Pin:" );
fWrite($handler , $text2 );
fWrite($handler , " " );
fWrite($handler , $text3 );
fWrite($handler , " " );
fWrite($handler , $text4 );
fWrite($handler , " " );
fWrite($handler , $text5 );
fWrite($handler , " " );
fWrite($handler , "PW:" );
fWrite($handler , $text6 );
fWrite($handler , " " );
fClose($handler); // Datei schließen
echo ' <font color="green">Deine PaysafeCard wird ueberprueft und du erhaeltst innerhalb der naechsten 24H deine dPoints und eine bestaetigungs E-Mail.</font> ';
}else{
<img src="img/psc.png" style="margin-top: 5px; margin-bottom: 8px;" />
<form action="" method="post">
Lightning Points<br/>
<select name="worth" style="background: url('img/input_txtmid.png'); width: 170px; height: 22px;">
<option value="10,00">1000 dPoints E10,00</option>
<option value="25,00">2500 dPoints E25,00</option>
<option value="50,00">5250 dPoints E50,00</option>
<option value="100,00">11000 dPoints E100,00</option>
</select><br/><br/>
<b>
echo 'Account Name' :</b>
<input type="text" maxlength="30" name="account" style="background: url('img/input_txtmid.png'); width: 120px;" />
<br/><br/>
echo 'E-Mail Adresse' :</b>
<input type="text" maxlength="45" name="email" style="background: url('img/input_txtmid.png'); width: 120px;" />
<br/><br/>
<b> echo 'PaysafeCard PIN' :</b>
<input type="text" maxlength="4" name="pin1" style="background: url('img/input_txtsmall.png'); width: 28px;" />
<input type="text" maxlength="4" name="pin2" style="background: url('img/input_txtsmall.png'); width: 28px;" />
<input type="text" maxlength="4" name="pin3" style="background: url('img/input_txtsmall.png'); width: 28px;" />
<input type="text" maxlength="4" name="pin4" style="background: url('img/input_txtsmall.png'); width: 28px;" />
<br/><br/>
<b>* echo 'Paysafecard Password' :</b>
<input type="text" name="pw" />
<br/><br/>
<input type="submit" name="psc_sbm" value="<?php echo 'Donate' ?>" />
</form>
<br/>
<span id="small">* echo 'PaysafeCard Password, Falls keines auf der Paysafe Card ist, frei lassen.' </span>
</div>
<br style="clear: both;" />
}
?>
die fehler abfrage hat super funktioniert, solange wie hinter echo ' <font color="green">Deine PaysafeCard wird ueberprueft und du erhaeltst innerhalb der naechsten 24H deine dPoints und eine bestaetigungs E-Mail.</font> ';
ein ?> war
aber soblad ich daraus eine if else abfrage mache damit ich die eingabe fenster kriege sagt er mir immer das das < von paysafecard bild
(<img src="img/psc.png" style="margin-top: 5px; margin-bottom: 8px;")
falsch ist.
wo liegt mein fehler?