danna katiya help ekak denna (php)

sudu hawa

Well-known member
  • Dec 1, 2011
    1,626
    100
    63
    <?php
    // multiple recipients
    $to = '[email protected]' . ', '; // note the comma
    $to .= '[email protected]';

    // subject
    $subject = 'Birthday Reminders for August';

    // message
    $message = '
    <html>
    <head>
    <title>Birthday Reminders for August</title>
    </head>
    <body>
    <p>Here are the birthdays upcoming in August!</p>
    <img src="test.jpg"/>
    <table>
    <tr>
    <th>Person</th><th>Day</th><th>Month</th><th>Year</th>
    </tr>
    <tr>
    <td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
    </tr>
    <tr>
    <td>Sally</td><td>17th</td><td>August</td><td>1973</td>
    </tr>
    </table>
    </body>
    </html>
    ';

    // To send HTML mail, the Content-type header must be set
    $headers = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

    // Additional headers
    $headers .= 'To: Mary <[email protected]>, Kelly <[email protected]>' . "\r\n";
    $headers .= 'From: Birthday Reminder <[email protected]>' . "\r\n";
    $headers .= 'Cc: [email protected]' . "\r\n";
    $headers .= 'Bcc: [email protected]' . "\r\n";

    // Mail it
    mail($to, $subject, $message, $headers);
    ?>

    mekata ($_POST['First']) . yawana ekage name eka dagganna baha ne. eka karanne kohomada kiyala podi help ekak denna itin
     

    soopy452000

    Well-known member
  • Aug 21, 2006
    2,512
    148
    63
    37
    Malabe
    <?php
    // multiple recipients
    $to = '[email protected]' . ', '; // note the comma
    $to .= '[email protected]';

    // subject
    $subject = 'Birthday Reminders for August';

    // message
    $message = '
    <html>
    <head>
    <title>Birthday Reminders for August</title>
    </head>
    <body>
    <p>Here are the birthdays upcoming in August!</p>
    <img src="test.jpg"/>
    <table>
    <tr>
    <th>Person</th><th>Day</th><th>Month</th><th>Year</th>
    </tr>
    <tr>
    <td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
    </tr>
    <tr>
    <td>Sally</td><td>17th</td><td>August</td><td>1973</td>
    </tr>
    </table>
    </body>
    </html>
    ';

    // To send HTML mail, the Content-type header must be set
    $headers = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

    // Additional headers
    $headers .= 'To: Mary <[email protected]>, Kelly <[email protected]>' . "\r\n";
    $headers .= 'From: Birthday Reminder <[email protected]>' . "\r\n";
    $headers .= 'Cc: [email protected]' . "\r\n";
    $headers .= 'Bcc: [email protected]' . "\r\n";

    // Mail it
    mail($to, $subject, $message, $headers);
    ?>

    mekata ($_POST['First']) . yawana ekage name eka dagganna baha ne. eka karanne kohomada kiyala podi help ekak denna itin

    Hmm Coding eka nam awulak na ne kollo , script eka run wenawa ne..?:nerd: Mata therenne na oya mokadda kiyanne kiyala. :D
     

    soopy452000

    Well-known member
  • Aug 21, 2006
    2,512
    148
    63
    37
    Malabe
    oya machan custmer kenak register unama eyata yawana email ekek code eka thamai oya... custmer ge name eka message ekata da ganna kohomada kiyala ahuweeee

    Ah ehema kiyapan , umbata ona Database eke specific table ekaka thiyenne email records walata yawanna neh? hitu balanna mekata wisandumak.:yes:
     

    soopy452000

    Well-known member
  • Aug 21, 2006
    2,512
    148
    63
    37
    Malabe
    yes machan balala kiyapan machan loku udwwak

    Okata Database connection ekak hadanna ona , itapasse emails thiyana table eka link karanna.


    $username = "";
    $password = "";
    $hostname = "";
    $dbconn = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL");

    $database = mysql_select_db("email",$dbconn);

    $query = "SELECT email FROM eMail WHERE eMail_ID = '" . $_POST["eMail_ID"] . "'";
    $result = mysql_query($query) or die(mysql_error());
    $data = mysql_fetch_assoc($result);
    $entry = mysql_num_rows($result);
    //Check if entry exists
    if($entry !== 0){
    $message = '
    <html>
    <head>
    <title>Birthday Reminders for August</title>
    </head>
    <body>
    <p>Here are the birthdays upcoming in August!</p>
    <img src="test.jpg"/>
    <table>
    <tr>
    <th>Person</th><th>Day</th><th>Month</th><th>Year</th>
    </tr>
    <tr>
    <td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
    </tr>
    <tr>
    <td>Sally</td><td>17th</td><td>August</td><td>1973</td>
    </tr>
    </table>
    </body>
    </html>
    ';


    // To send HTML mail, the Content-type header must be set
    $headers = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

    // Additional headers
    $headers .= 'To: Mary <[email protected]>, Kelly <[email protected]>' . "\r\n";
    $headers .= 'From: Birthday Reminder <[email protected]>' . "\r\n";
    $headers .= 'Cc: [email protected]' . "\r\n";
    $headers .= 'Bcc: [email protected]' . "\r\n";

    if(mail($to, $from, $subject, $message, $headers)){
    echo 'Email sent';
    }else{
    echo 'Failed sending email';
    }
    }else{
    echo 'No email entry found';
    }
    mysql_close($dbconn);

    -------------------------------------------

    Try and let me know. :)
     

    sudu hawa

    Well-known member
  • Dec 1, 2011
    1,626
    100
    63
    Okata Database connection ekak hadanna ona , itapasse emails thiyana table eka link karanna.


    $username = "";
    $password = "";
    $hostname = "";
    $dbconn = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL");

    $database = mysql_select_db("email",$dbconn);

    $query = "SELECT email FROM eMail WHERE eMail_ID = '" . $_POST["eMail_ID"] . "'";
    $result = mysql_query($query) or die(mysql_error());
    $data = mysql_fetch_assoc($result);
    $entry = mysql_num_rows($result);
    //Check if entry exists
    if($entry !== 0){
    $message = '
    <html>
    <head>
    <title>Birthday Reminders for August</title>
    </head>
    <body>
    <p>Here are the birthdays upcoming in August!</p>
    <img src="test.jpg"/>
    <table>
    <tr>
    <th>Person</th><th>Day</th><th>Month</th><th>Year</th>
    </tr>
    <tr>
    <td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
    </tr>
    <tr>
    <td>Sally</td><td>17th</td><td>August</td><td>1973</td>
    </tr>
    </table>
    </body>
    </html>
    ';


    // To send HTML mail, the Content-type header must be set
    $headers = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

    // Additional headers
    $headers .= 'To: Mary <[email protected]>, Kelly <[email protected]>' . "\r\n";
    $headers .= 'From: Birthday Reminder <[email protected]>' . "\r\n";
    $headers .= 'Cc: [email protected]' . "\r\n";
    $headers .= 'Bcc: [email protected]' . "\r\n";

    if(mail($to, $from, $subject, $message, $headers)){
    echo 'Email sent';
    }else{
    echo 'Failed sending email';
    }
    }else{
    echo 'No email entry found';
    }
    mysql_close($dbconn);

    -------------------------------------------

    Try and let me know. :)


    machan ohoma nameeeeee... mata onne mesage ekata yawana ekage detils ad karaganna