hey guyz,
i have this email verification in my user registration system... i wanted to know that why am i getting this lill thing when i test it on my computer....
this code is from the password recovery section..... but is pretty much the same as the original verification....
this is the code for it...
plz tell me if there is any error.....or if i need to do somthin with the php-ini file........
or is it just that i cant test mail things on my computer....
also one more thing... why is is that when i delete records from phpmyadmin... the id of the rows does not reset... like i mean that e.g:
i have 2 rows with id's "1" and "2"...
when i delete row 2.... and add another row.... its id is 3 and not 2........ i use auto increment though...
thnx !
i have this email verification in my user registration system... i wanted to know that why am i getting this lill thing when i test it on my computer....
this code is from the password recovery section..... but is pretty much the same as the original verification....
| Quote: |
| Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in C:\Program Files\Apache Group\Apache2\htdocs\Solo Themes\forgot.php on line 273
Your password has been sent! Please check your email! |
this is the code for it...
| Code: |
| if ($_POST['Recover']) {
$email_address = $_POST['email_address']; if(!$email_address){ echo "<b><font color=\"red\">You forgot to enter your Email address ! </font><b><br><br>"; include 'includes/lost_pw.htm'; } else { // quick check to see if record exists $sql_check = mysql_query("SELECT * FROM users WHERE email_address='$email_address'"); $sql_check_num = $sql_check; if($sql_check_num == 0){ echo "No records found matching your email address<br />"; include 'includes/lost_pw.htm'; } else { // Everything looks ok, generate password, update it and send it! function makeRandomPassword() { $salt = "abchefghjkmnpqrstuvwxyz0123456789"; srand((double)microtime()*1000000); $i = 0; while ($i <= 7) { $num = rand() % 33; $tmp = substr($salt, $num, 1); $pass = $pass . $tmp; $i++; } return $pass; } $random_password = makeRandomPassword(); $db_password = $random_password; $sql = mysql_query("UPDATE users SET password='$db_password' WHERE email_address='$email_address'"); $subject = "Your Password at SoloThemes!"; $message = "Hi, we have reset your password. New Password: $random_password http://www.Solothemes.com Thanks! The Webmaster This is an automated response, please do not reply!"; mail($email_address, $subject, $message, "From: SoloThemes Webmaster<no-reply@solothmes.com>\n X-Mailer: PHP/" . phpversion()); echo "Your password has been sent! Please check your email!<br /><br />"; } } } |
plz tell me if there is any error.....or if i need to do somthin with the php-ini file........
or is it just that i cant test mail things on my computer....
also one more thing... why is is that when i delete records from phpmyadmin... the id of the rows does not reset... like i mean that e.g:
i have 2 rows with id's "1" and "2"...
when i delete row 2.... and add another row.... its id is 3 and not 2........ i use auto increment though...
thnx !
