-
http://php.flashwebhost.com/stefin/contact.php
Code:
<?php
if (isset($_POST['submit'])) {
$fromEmail = $_POST['fromEmail'];
$body = $_POST['body'];
mail('[email protected]','Message from web site', $body,
'From: ' . $fromEmail . "\n\r");
echo 'Thank you for contacting us.';
} else {
echo
'<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Contact Us</title>
</head>
<body>
<form action="contact.php" method="POST">
Email<br> <input type="text" name="fromEmail"><br>
Message<br> <textarea name="body" cols="30" rows="10"></textarea>
<br> <button type="submit" name="submit" value="submit">Send Mail</button></form>
</body></html>
';}
-
Quote:
Originally Posted by
stefin
http://php.flashwebhost.com/stefin/contact.php
Code:
<?php
if (isset($_POST['submit'])) {
$fromEmail = $_POST['fromEmail'];
$body = $_POST['body'];
mail('[email protected]','Message from web site', $body,
'From: ' . $fromEmail . "\n\r");
echo 'Thank you for contacting us.';
} else {
echo
'<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Contact Us</title>
</head>
<body>
<form action="contact.php" method="POST">
Email<br> <input type="text" name="fromEmail"><br>
Message<br> <textarea name="body" cols="30" rows="10"></textarea>
<br> <button type="submit" name="submit" value="submit">Send Mail</button></form>
</body></html>
';}
Very nice script :)
If [email protected] is not your email address, it is better change it. If not if some one submit that form, we will mail the content to [email protected], that will be like sending spam.. as he don't want us to send him such mails.
-
Code:
<?php
if (isset($_POST['submit'])) {
$formEmail = $_POST['formEmail'];
$body = $_POST['body'];
mail('[email protected]', 'Message from Skype', $body , 'From: ' . $fromEmail . "\n\r");
echo 'Thanks for Contacting us';
} else {
echo
'<!doctype html>
<html lang="en">
<head>
<meta charset = "UTF-8">
<title> Contact Us </title>
</head>
<body>
<form action= "form.php" method="POST">
Email <br>
<input type="text" name="fromEmail"> <br>
Message <br>
<textarea name="body" cols="30" rows="10"></textarea>
<br>
<button type="submit" name="submit" value="submit"> Send Mail </button>
</form>
</body>
</html>';}
http://php.flashwebhost.com/annie/form.php
-
http://php.flashwebhost.com/sherly/mailform.php
Code:
<?php
if (isset($_POST['submit'])) {
$formEmail = $_POST['formEmail'];
$body = $_POST['body'];
mail('[email protected]', 'Message from Web Site', $body , 'From: ' . $fromEmail . "\n\r");
echo 'Thanks for Contacting us';
} else {
echo
'<!doctype html>
<html lang="en">
<head>
<meta charset = "UTF-8">
<title> Contact Us </title>
</head>
<body>
<form action= "mailform.php" method="POST">
Email <br>
<input type="text" name="fromEmail"> <br>
Message <br>
<textarea name="body" cols="30" rows="10"></textarea>
<br>
<button type="submit" name="submit" value="submit"> Send Mail </button>
</form>
</body>
</html>';}
-
Quote:
Originally Posted by
annie
Code:
<?php
if (isset($_POST['submit'])) {
$formEmail = $_POST['formEmail'];
$body = $_POST['body'];
mail('[email protected]', 'Message from Skype', $body , 'From: ' . $fromEmail . "\n\r");
echo 'Thanks for Contacting us';
} else {
echo
'<!doctype html>
<html lang="en">
<head>
<meta charset = "UTF-8">
<title> Contact Us </title>
</head>
<body>
<form action= "form.php" method="POST">
Email <br>
<input type="text" name="fromEmail"> <br>
Message <br>
<textarea name="body" cols="30" rows="10"></textarea>
<br>
<button type="submit" name="submit" value="submit"> Send Mail </button>
</form>
</body>
</html>';}
http://php.flashwebhost.com/annie/form.php
When mail is submitted, it will be sent to [email protected]
PHP Code:
mail('[email protected]', 'Message from Skype', $body , 'From: ' . $fromEmail . "\n\r");
That can result in spam complaint as you don't own that email address. So make sure you set it to your email address, so only you get the email.
You can delete the script later, if not spam bots will find it and sent spam message using the contact us form, this is why many sites use Captcha on contact forms.
-
http://php.flashwebhost.com/mini/email.php
Code:
<?php
if (isset($_POST['submit'])) {
$fromEmail = $POST['fromEmail'];
$body = $_POST['body'];
mail('[email protected]','Message from web site', $body, 'From: ' . $fromEmail . "\n\r");
echo 'Thank you for contacting us.';
}
else { echo
'<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Contact Us</title>
http://php.flashwebhost.com/mini/email.php
<form action="email.php" method="POST">
Email<br>
<input type="text" name="fromEmail"><br>
Message<br>
<textarea name="body" cols="40" rows="10"></textarea>
<br>
<button type="submit" name="submit" value="submit">Send Mail</button></form>
</body>
</html>
';}
-
http://php.flashwebhost.com/ramesh/day-12/contact1.php
PHP Code:
<?php
if (isset($_POST['submit'])) {
$fromEmail = $_POST['Email'];
$body = $_POST['body'];
mail('[email protected]','Message from web site', $body, 'From: ' . $Email);
echo 'Thank you for contacting us.';}
else {
echo
'<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Contact Us</title>
</head>
<body>
<form action="contact1.php" method="POST">
Email<br> <input type="text" name="Email"><br>
Message<br> <textarea name="body" cols="30" rows="10"></textarea>
<br> <button type="submit" name="submit" value="submit">Send Mail</button></form>
</body></html>
';}
-
DAY 12 PHP PROGRAMMING
http://php.flashwebhost.com/tom/day_12_ex_1.php
PHP Code:
<?php
$toEmail = 'php.flashwebhost.com';$subject = 'Email Notification';$body = 'Welcome to our Email Service';
mail($toEmail, $subject, $body);
echo 'Mail sent to ' . $toEmail;
-
DAY 12 PHP PROGRAMMING
http://php.flashwebhost.com/tom/day_12_ex_3.html
Code:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Contact Us</title>
</head>
<body>
<form action="day_12_ex_3.php" method="POST">
Email<br>
<input type="text" name="fromEmail"><br>
Message<br>
<textarea name="body" cols="30" rows="10"></textarea>
<br>
<button type="submit" name="submit" value="submit">Send Mail</button>
</form>
</body>
</html>
-
Code:
<?php
if (isset($_POST['submit'])) {
$fromEmail = $POST['fromEmail'];
$body = $_POST['body'];
mail('[email protected]','Message from web site', $body, 'From: ' . $fromEmail . "\n\r");
echo 'Thank you for contacting us.';
} else {
die('Why are you here ? Want to hack my Script ?');
}