Jump to content

Recommended Posts

you need to send an HTML email by passing a content type in your headers:

 

$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

 

Check out Example #4 here: http://us.php.net/manual/en/function.mail.php

Below is my full code here where i have to give this content code.... tel me the correct solution please

 

<?php

$operation = $_GET['Opr'];

$name=$_GET['name'];

$email=$_GET['email'];

$address=$_GET['address'];

$wish=$_GET['wish'];

$from = "Maruvathooramma.blogspot Team";

$to = $_GET['email'];

$subject = "Thankyou For Your Amma Birthday Wishes";

$body = "<img src='http://www.onlinepcsecure.com/amma/amma.jpg'>" ;

$headers = "From: $from";

 

$temp = 0;

 

if($operation=="saveAmmaWish")

{

$con = mysql_connect("localhost","name","pass");

mysql_select_db("mittaai_mittai", $con) or die( "Unable to select database");

$query = "INSERT INTO ammawish (name, email, address, wish) VALUES ('$name', '$email', '$address', '$wish')";

mysql_query($query);

mysql_close();

 

 

if (mail($to, $subject, $body, $headers))

echo ("Thankyou, For Your Wishes");

 

 

}

 

 

?>

Next, use code tags. Just click the button with the # on it, and put your code between the tags it inserts.

 

<?php
$operation = $_GET['Opr'];
$name=$_GET['name'];
$email=$_GET['email'];
$address=$_GET['address'];
$wish=$_GET['wish'];
$from = "Maruvathooramma.blogspot Team";
$to = $_GET['email'];
$subject = "Thankyou For Your Amma Birthday Wishes";
$body = "<img src='http://www.onlinepcsecure.com/amma/amma.jpg'>" ;

$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= "From: $from\r\n";

$temp = 0;

if($operation=="saveAmmaWish")
{
   $con = mysql_connect("localhost","name","pass");
   mysql_select_db("mittaai_mittai", $con) or die( "Unable to select database");
   $query = "INSERT INTO ammawish (name, email, address, wish) VALUES ('$name', '$email', '$address', '$wish')";
   mysql_query($query);
   mysql_close();
   
   
   if (mail($to, $subject, $body, $headers))
   echo ("Thankyou, For Your Wishes");
   

}
?>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.