PDA

View Full Version : Account confirmation account email


bobjohn1212
02-05-2009, 05:29 PM
I'm looking to create a script that sends a random code via email to a new member, which the member must click on to activate there new account in my website. Any help would be great. I'm a novice at this!!!

davidj
02-06-2009, 08:05 AM
if you have no coding knowledge then this is going to be impossible to explain how to do it

fancy learning how to code

bobjohn1212
02-06-2009, 12:24 PM
I have some coding experience. If you explain it, I can do it. Thanks.

davidj
02-06-2009, 12:27 PM
do you have PHP coding experience

davidj
02-06-2009, 12:31 PM
your index page needs to check a verification flag in your user table

if you load the index and log in and the flag is set to 0 then a message of "waiting to verify you" should display

when the user registers an email should be sent to the address he has used to register. The details stored

the email should contain a link to a blank (no html) verification script which catches the ID of the user and then changes the user verification flag from 0 to 1

job done

norbert_ds
02-13-2009, 05:06 AM
Hi Davidj,

I am hoping to create the same verification page however and I am not hoping to get some free scripts, rather I am trying to teach myself with some tips from other websites etc.

I've done the login page where the email ID and password are stored on my database (I'm using XAMPP for mySQL, PHP & Apache) on windows.

Before reaching to the stage of "the email should contain a link to a blank (no html) verification script which catches the ID of the user and then changes the user verification flag from 0 to 1"... I am trying to send a simple test email which I am not able to send. I don;t know if I am doing something wrong or...

Can you guide me to either a link to another website or from your own knowledge:
1. Do I need to have any mail server running on my windows system?
2. <?php include('class.phpmailer.php');
include('class.smtp.php');

//process the email
if(array_key_exists('send', $_POST))
{
$to = $row_EmailVerification['Username'];
$subject = 'feedback';
$from = 'admin';
$message = 'Test';

//send it
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$mailsent = mail($to, $subject, $message, $from, $headers);
}

?>

What am I doing wrong in the above code because, I don;t receive any email message. The only reason I am using include('class.phpmailer.php') is that I read that it is a very good class for mails. If I don't use it do I need to include any other class?

Thanks in advance

Regards
Norbert

norbert_ds
02-13-2009, 05:59 AM
Actually I think I'm going to just start a new thread re: emails since this for now is just an email issue.