Parašė Dariukas.· 2012 Sau. 9 20:01:05
#1
Sveiki, taigi susiradau kontaktu forma, ja uzpildau spaudziu submit ir vistiek negaunu laisko i savo email, va kodas:
CONTACT.PHP FAILAS
<?php
$field_name = $_POST['cf_name'];
$field_email = $_POST['cf_email'];
$field_message = $_POST['cf_message'];
$mail_to = 'blabla@gmail.com';
$subject = 'Pranesimas nuo tinklalapio svecio'.$field_name;
$body_message = 'Nuo: '.$field_name."\n";
$body_message .= 'El. Pastas: '.$field_email."\n";
$body_message .= 'Zinute: '.$field_message;
$headers = 'Nuo: '.$field_email."\r\n";
$headers .= 'To: '.$field_email."\r\n";
$mail_status = mail($mail_to, $subject, $body_message, $headers);
if ($mail_status) { ?>
<script language="javascript" type="text/javascript">
alert('Aciu jums uz zinute, pasistengsime susisiekti kuo greiciau.');
window.location = 'kontaktai.html';
</script>
<?php
}
else { ?>
<script language="javascript" type="text/javascript">
alert('Klaida! Siuskite zinute El. Pastu: <a href="mailto:blabla@gmail.com"><span style="color:005C5B">blabla@gmail.com</span></a>');
window.location = 'kontaktai.html';
</script>
<?php
}
?>
INDEX.HTML FAILAS
<form action="contact.php" method="post"><br>
Jusu vardas:<br>
<input name="cf_name"><br>
Jusu El. Pastas:<br>
<input name="cf_email" class="email"><br>
Jusu klausimas, zinute:<br>
<textarea name="cf_message"></textarea><br><br>
<input type="submit" value="submit">
</form>
Padekite kas nors :/ arba prisekite gera skripta, aciu, uz pagalba aisku duosiu +11