- <?php
-
//print_r($_REQUEST);
-
$link = mysql_connect('localhost', 'root', '');
-
if (!$link) {
-
die('Could not connect: ' . mysql_error());
-
}
-
mysql_select_db("moes", $link);
-
$confirm_code= md5(uniqid(rand()));
-
$fname=$_POST['First_Name'];
-
$lname=$_POST['Last_Name'];
-
$address=$_POST['Address'];
-
$country=$_POST['Country'];
-
$state=$_POST['State'];
-
$city=$_POST['City'];
-
$pincode=$_POST['Pincode'];
-
$cnumber=$_POST['Contactno'];
-
$gender=$_POST['Gender'];
-
$birthday=$_POST['Year'].'-'.$_POST['Month'].'-'.$_POST['Day'];
-
$email=$_POST['Email_Id'];
-
$password1=$_POST['Password1'];
-
$encrypted_mypassword1=md5($password1);
-
$password2=$_POST['Password2'];
-
$encrypted_mypassword2=md5($password2);
-
$query="INSERT INTO user_registration(first_name,last_name,address,city,state,pincode,country,contact_number,gender,date_of_birth,email_id,password1,password2) VALUES ('$fname','$lname','$address','$city','$state','$pincode','$country','$cnumber','$gender','$birthday','$email','$encrypted_mypassword1','$encrypted_mypassword2')";
-
$success=mysql_query($query, $link);
-
-
if($success) {
-
$to = $email;
-
$subject = 'Confirm your account with MOES';
-
$message="Your Comfirmation link \r\n";
-
// $message.="Click on this link to activate your account \r\n";
-
//$message.="http://www.example.com/confirmation.php?passkey=$confirm_code";
-
$headers = "From: sender@yourdomain.com rn";
-
$sentmail=mail($to,$subject,$message,$header);
-
}
-
-
if($sentmail)
-
{
-
echo "your confirmaiton link has been send to your account";
-
$header = 'Location: http://localhost/client/thankyou.php';
-
-
}
-
-
else {
-
echo "can not send confirmation link to your account";
-
}
-
?>
i have this kind of code any one can help me why i get the error Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\xampp\htdocs\clientc\action.php on line 34
can not send confirmation link to your account 2 1593
it mean open your php.ini and setup your send mail options
$headers = "From: sender@yourdomain.com rn";
$sentmail=mail($to,$subject,$message,$header);
you r missing s
$sentmail=mail($to,$subject,$message,$headers);
Sign in to post your reply or Sign up for a free account.
Similar topics
by: haref |
last post by:
hi ng,
what can i do in the following mail function, which hast 400
subscribers
who are read from a database and to which the mails are send in a
loop, when there are some adresses who are not...
|
by: haref |
last post by:
hi ng,
what can i do in the following mail function, which hast 400
subscribers
who are read from a database and to which the mails are send in a
loop, when there are some adresses who are not...
|
by: Jim Seymour |
last post by:
I have a contact form that uses PHP's mail() function. It recently
came to my attention that (some?) MS-Windows mail servers may not
properly process data given to the mail() function that's only...
|
by: Groupe Eurower |
last post by:
Hi,
I would like contribute to the PHP development but i don't really know where
i can submit my codes !
In fact, i'm a Web Hosting and i authorize the utilisation of the mail()
function.
...
|
by: Bandul |
last post by:
Hi everyone
I am trying to send a e-mail using the mail() function.
Now i try to send more than one data from mysql database so i must use
example
$results=mysql_num_rows($result_query)...
|
by: Nert |
last post by:
hello every one, i need help..
how can i use the mail() funtion in php? when ever i execute the mail function i continuesly receive this error message:
what do i need to do in order for me...
|
by: shror |
last post by:
hi every body,
i have a problem which is when i was checking my mail() form it work
fine but the problem is that the form configuration is not set
correctly, in details:
the from var is not...
|
by: Abersparky |
last post by:
Can someone help me with the mail() function???
The below is just to get myself going but I can't seem to get it
working... is there something else I should be doing? I checked
phpinfo() and the...
|
by: empiresolutions |
last post by:
I am using a standard mail function within an AMFPHP Class that i have used many times. Now, when i use it it does not work right. When a mail is sent, the $header info and html shows in the email. ...
|
by: swethak |
last post by:
hi,
i used the below mentioned code mail function didn't work.that means it didn't give any error and also mail didn't receive.plz tell that what's the mistake
and my php.ini contains
;...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |