i am developing a website in xampp 1.72 and the problem is when i am trying to add a new user to my database in the addUser.php , after submitting i am getting the following error:
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\Vital31\admin\newUser.php on line 34
Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\Vital31\admin\newUser.php:34) in C:\xampp\htdocs\Vital31\admin\newUser.php on line 35
but when i check my database in mySql , the user has been added perfectly but now when i tried logging in as the user with the temperory password provided by the admin, i cannot login.
i havent hosted my site in internet as it is still under development and hence,running on localhost alone.
is there any way to solve my problem without connecting to internet as during my project presentation, i wont have a working internet connection to connect to internet and hence have to show the complete working on localhost alone.
i read through many posts on this forum and other sites as well but all are saying to install a mail server and then connect to internet but xampp has already provided me with the mercury mailserver.
please help me out...i am posting the code here and havent made any changes in my php.ini and sendmail.ini file yet :
$query="insert into user_details(firstName, middleName, lastName, age, gender, dateOfBirth, contact1, contact2, personalEmail, companyEmail, permanentAddress, localAddress, qualification, dateOfJoining) values('".$_POST[firstName]."', '".$_POST[middleName]."', '".$_POST[lastName]."', '".$_POST[age]."', '".$_POST[gender]."', '".$dateOfBirth."', '".$_POST[contact1]."', '".$_POST[contact2]."', '".$_POST[personalEmail]."', '".$_POST[companyEmail]."', '".$_POST[permanentAddress]."', '".$_POST[localAddress]."', '".$_POST[qualification]."', '".$dateOfJoining."')";
$query="insert into user_login(userId, password) values('".$_POST[userId]."', '".$_POST[password]."')";
if($result1 && $result2)
$to = "$_POST[personalEmail]";
$subject = "Your Account @ site";
$message = "Account Details :
Company Email Id : $_POST[companyEmail]
User Id : $_POST[userId]
Temporary Password : $_POST[password]";
$headers = "From: email@example.com";
$message = wordwrap($message2, 70);