Brand new to php, but having a ball with it. I needed a login system for my site and found one that seemed pretty straight forward (Jpmaster77). I thought it would be easier to use existing code and build off that as I got better. So far so good.
My problem is I can't get email to send. So I built a small email app separate from his code and it worked fine, proving that my ISP/Sever does send email.
The code looks fine in the "login system"
function sendNewPass($user, $email, $pass){
$from = "From: ".EMAIL_FROM_NAME." <".EMAIL_FROM_ADDR.">";
$subject = "Cyberwerkstatt's Site - Your new password";
$body = $user.",\n\n"
."We've generated a new password for you at your "
."request, you can use this new password with your "
."username to log in to Cyberwerkstatt's Site.\n\n"
."Username: ".$user."\n"
."New Password: ".$pass."\n\n"
."It is recommended that you change your password "
."to something that is easier to remember, which "
."can be done by going to the My Account page "
."after signing in.\n\n"
."-Cyberwerkstatt's Site";
return mail($email,$subject,$body,$from);
The entire "Login system" is built with classes and everything "includes" the "session" class. I don't see anything out of order there.
So any help would be appreciated and I guess I am getting my first taste of reverse engineering!
Thanks in advance
356cabbie