Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Reikia pagalbos

Parašė WyPuk· 2010 Vas. 20 16:02:06
#12

<?
$admin_email = "mail@gmail.com";// kur bus siun?iami lai?kai

if (isset($_POST['siusti'])) {
if (preg_match('/^[a-zA-Z0-9\._\-]+@[a-zA-Z0-9\.\-_]+\.[a-zA-Z0-9]{2,4}$/', $_POST['email'])) {

$tekstas .= "Gamenick: $_POST[nick]\n";
$tekstas .= "Skype: $_POST[skype]\n";
$tekstas .= "E-Pastas: $_POST[email]\n";
$tekstas .= "Numeris: $_POST[nr]\n";
$IP .= "IP: ".$_SERVER['REMOTE_ADDR']."\n";

mail($admin_email,"Siusti registracija",$tekstas,"From: ".$_POST['email']."");
echo "<center>U&#254;klausimas i&#240;siustas. Laukite administratoriaus &#254;inutes.<br><br><a href='index.php'>Atgal</a></center>";
} else {
echo "<center>Neteisingas E-Pa?to adresas.<br><br><a href='index.php'>Bandyti dar karta</a></center>";
}
} else {
?>
<form name="emailform" method="post" action="">
<table align="center" cellpadding="0" cellspacing="1">
<td align="center" colspan="2">Registracija &#303; 3x3 Turnyr&#261;<br><br></td>
</tr>
<tr>
<td>GameNick:</td>
<td><input type="text" name="nick"></td>
</tr>
<tr>
<td>Skype:</td>
<td><input type="text" name="skype"></td>
</tr>
<tr>
<td>El-Pa&#353;tas:</td>
<td><input type="text" name="email"></td>
</tr>
<tr>
<td>Numeris:</td>
<td><input type="text" name="nr"></td>
</tr>
<tr>
<td>IP adresas:</td>
<td><input disabled='disabled' type='text' name='ip' value='$IP' maxlength='20' class='style7' style='width:120px;'></td>
</tr>
<tr>
<td colspan="2" align="center"><br><br>
<input type="submit" name="siusti" value="VIP">
</td>
</tr>
</table>
</form>
<?php
}
?>