Imam jedan problem oko kontakt forme. Kada ukucam nesto u formi, ona na email adresu koja je navedena posalje praznu poruku... Zna li neko o cemu je rec...
index.html
<table width="400" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td><form name="form1" method="post" action="send_contact.php">
<div align="left"><span class="style9">Postavite pitanje</span>
</div>
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td width="15%"><span class="style13">Poruka</span></td>
<td width="4%">:</td>
<td width="81%"><textarea name="detail" cols="20" rows="4" class="style13" id="detail"></textarea></td>
</tr>
<tr>
<td><span class="style13">Ime i Prezime</span></td>
<td>:</td>
<td><input name="name" cols="20" type="text" class="style13" id="name" size="50"></td>
</tr>
<tr>
<td><span class="style13">Email</span></td>
<td>:</td>
<td><input name="customer_mail" cols="20" type="text" class="style13" id="customer_mail" size="50"></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input name="Submit" type="submit" class="style13" value="Posalji"></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
i send_contact.php
<?php
// Contact subject
$subject ="$subject";
// Details
$message="$detail";
// Mail of sender
$mail_from="$customer_mail";
// From
$header="from: $name <$mail_from>";
// Enter your email address
$to ='tomicakg@gmail.com';
$send_contact=mail($to,$subject,$message,$header);
// Check, if message sent to your email
// display message "We've recived your information"
if($send_contact){
echo "Vaša poruka je poslata. Ubrzo ce te dobiti odgovor na email adresu koju ste naveli u kontaktu.";
}
else {
echo "Došlo je do greške. Pokušajte malo kasnije.";
}
?>
|