skripta sa sajta što je Rayan postavio neznam zašto ali nece da mi radi skripta je :
- <html>
-
- <head>
- <meta http-equiv="Content-Language" content="sr">
- <meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
- <title>E-mail Form</title>
- </head>
-
- <body>
-
- <form method="POST" action="contact.php">
- <p align="center" style="margin-top: 0; margin-bottom: 0"> </p>
- <div align="center">
- <table border="1" id="table1" style="border-width: 0px" width="367">
- <tr>
- <td style="border-style: none; border-width: medium" width="96">
- <font face="Verdana" size="2"><span lang="sr">Ime i Prezime:</span></font></td>
- <td style="border-style: none; border-width: medium">
- <font face="Verdana"><input type="text" name="name" size="25"></font></td>
- </tr>
- <tr>
- <td style="border-style: none; border-width: medium" width="96">
- </td>
- <td style="border-style: none; border-width: medium">
- </td>
- </tr>
- <tr>
- <td style="border-style: none; border-width: medium" width="96">
- <font face="Verdana" size="2">Vaš e-mail:</font></td>
- <td style="border-style: none; border-width: medium">
- <font face="Verdana"><input type="text" name="email" size="25"></font></td>
- </tr>
- <tr>
- <td style="border-style: none; border-width: medium" colspan="2"> </td>
- </tr>
- <tr>
- <td style="border-style: none; border-width: medium" width="96">
- <font face="Verdana" size="2">Naslov:</font></td>
- <td style="border-style: none; border-width: medium">
- <font face="Verdana">
- <input type="text" name="subject" size="25"></font></td>
- </tr>
- <tr>
- <td style="border-style: none; border-width: medium" width="96"> </td>
- <td style="border-style: none; border-width: medium"> </td>
- </tr>
- <tr>
- <td style="border-style: none; border-width: medium" valign="top" width="96">
- <font face="Verdana" size="2">Poruka:</font></td>
- <td style="border-style: none; border-width: medium">
- <font face="Verdana">
- <textarea rows="7" name="message" cols="30"></textarea></font></td>
- </tr>
- <tr>
- <td style="border-style: none; border-width: medium" valign="top" width="96"> </td>
- <td style="border-style: none; border-width: medium"> </td>
- </tr>
- <tr>
- <td style="border-style: none; border-width: medium" valign="top" width="96"> </td>
- <td style="border-style: none; border-width: medium">
- <input type="submit" value="Pošalji" name="B1" style="font-family: Verdana; font-size: 10pt"></td>
- </tr>
- </table>
-
-
-
- </form>
-
- </body>
-
- </html>
PHP mail skripta
Kod:
- <?php
-
- $name = $HTTP_POST_VARS['name'];
- $email = $HTTP_POST_VARS['email'];
- $subject = $HTTP_POST_VARS['subject'];
- $message = $HTTP_POST_VARS['message'];
-
-
- if (!$name OR !$email OR !$message OR !$subject) die("Popunite sva polja");
- $to = "neko@nesto.com";
-
- $headers = "From: $name <$email>\n";
-
-
- if (!mail($to, $subject, $message, $headers)) die("Greska prilikom slanja maila!");
- echo "Mail je uspesno poslat.";
-
-
- ?>
i ovaj deo skripte mi izbaci
- if (!mail($to, $subject, $message, $headers)) die("Greska prilikom slanja maila!");
- echo "Mail je uspesno poslat.";
-
-
- ?>
|