|
-
Aug 6th, 2002, 11:48 AM
#1
Thread Starter
Hyperactive Member
How do i send Emails from a Submit button?
I think someone answered this question before, but anyway:
How do i send information such as inside TextBoxes, Passwords, selected combos, ect. over EMail?
-
Aug 6th, 2002, 03:42 PM
#2
<?="Moderator"?>
Code:
<form action="mailto:[email protected]" method="post">
<input type="text" name="stuff">
<input type="checkbox" name="check" value="wow">
<input type="submit" value="send email" name="submit">
</form>
this will send it to your email address. the form data will be in an attachment.
btw. its send from the client
-
Aug 6th, 2002, 04:45 PM
#3
Thread Starter
Hyperactive Member
-
Aug 6th, 2002, 04:57 PM
#4
Thread Starter
Hyperactive Member
isn't there a code that WONT bring up Outlook or MSN "Write E-Mail"? and justs sends it?
-
Aug 6th, 2002, 05:54 PM
#5
New Member
Then you need to send it server-side. Use PHP, perl or any other web-languages.
i can show you in PHP:
1 thing: make sure your server has enabled the PHP's mail command
1 page:
Code:
<form action="THESCRIPT.PHP" method="post">
<input type="text" name="subject">
<input type="text" name="message">
<input type="submit" value="send email" name="submit">
</form>
THESCRIPT.PHP:
PHP Code:
$yourname = "Enter your or your site's name here in-between the quotes";
$sendemail = "Enter the email to send this to here in-between the quotes";
/***************************************
**THAT'S IT DON'T TOUCH THE CODE BELOW**
***************************************/
$message = $message + "\n\nIP Address Of User: " + $HTTP_SERVER_VARS["REMOTE_ADDR"];
$mailstat = mail($sendemail, $subject, $message);
if ($mailstat == TRUE) {
echo "<h2>Maill Sent!</h2>";
} else {
echo "<h2>Maill Couldn't Be Sent.</h2>";
}
As for other languages i wouldn't be able to help.
PHP Information
Another post by Kevin.
Best viewed with common sense enabled. 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|