FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » General » PHP discussions » Using PHP to send mail
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Ynt: Re: Using PHP to send mail [message #186978 is a reply to message #166368] Thu, 08 October 2015 06:55 Go to previous message
anilk123 is currently offline  anilk123
Messages: 3
Registered: October 2015
Location: Turkey
Karma:
Junior Member
Create and copy index.php
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>www.yazilimdilleri.net</title>
</head>
<body>
<form action="mail.php" method="post">
İsminiz:<br/>
<input type="text" name="name"/><br/>
E-Posta adresiniz:<br/>
<input type="text" name="email"/><br/>
Konu:<br/>
<input type="text" name="subject"/><br/>
Mesajınız:</br>
<textarea name="message"></textarea><br/>
input type="submit" value="Gönder"/>
</form>
</body>

Createa and copy mail.php
if(isset($_[POST]['name']) && isset($_[POST]['email']) && isset($_[POST]['subject']) && isset($_[POST]['message']))
{
if(empty($_[POST]['name']) || empty($_[POST]['email']) || empty($_[POST]['subject']) || empty($_[POST]['message']))
{
echo "Lütfen formu tam doldurunuz";
}
else
{
$name = strip_tags($_POST['name']);
$email = strip_tags($_POST['email']);
$subject = strip_tags($_POST['subject']);
$message = strip_tags($_POST['message']);
$icerik = 'İsim: ' .$name. '<br/>E-Mail: ' .$email. '<br/>'. $mesaj;
mail('iletisim(at)batuhanavlayan(dot)com', $subject, $icerik);

//your@site . com yerine mail hangi adrese gidecek ise o adresi yazıyoruz.
echo "Mesajınız başarı ile gönderildi.";
}
}
else
{
echo 'Lütfen Formu Doldurun';
}


Its mee
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Create mysql database using mysql command
Next Topic: PHP cli problems
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat May 18 08:29:52 GMT 2024

Total time taken to generate the page: 0.05056 seconds