web design help

sudu hawa

Well-known member
  • Dec 1, 2011
    1,630
    100
    63
    yaluwane help ekak onne

    mehemai mama php walin register code eke liwa
    mekata thanking email ekak yana hati danne na eka mata kiyala denna kooo.. plz help meee.........

    <?php
    $First = $_POST["FirstName"];
    $Last = $_POST["LastName"];
    $Email = $_POST["Email"];
    $Company = $_POST["CompanyName"] ;
    $Address = $_POST["Address"] ;
    $Postal = $_POST["PostalCode"] ;
    $CreateUser = $_POST["CreateUser"] ;
    $CreatePassword = $_POST["CreatePassword"] ;
    $Country = $_POST["Country"] ;
    if (empty($_POST["CreateUser"]))
    {
    echo "Enter All";
    }

    else
    {

    echo "Your Application has Sent..." . "<br>" . "<br>" ;
    echo "Your Details :" . "<br>";
    echo $First . "<br>";
    echo $Last . "<br>";
    echo $Email . "<br>" ;
    echo $Company . "<br>";
    echo $Address . "<br>";
    echo $Postal . "<br>";
    echo $CreateUser . "<br>";
    echo $CreatePassword . "<br>";
    echo $Country . "<br>";

    $username="sudu";
    $hostname="localhost";
    $password="1548";
    $con=mysql_connect($hostname,$username,$password);
    echo "Thank You";
    $select=mysql_select_db("good",$con);

    $result=mysql_query("INSERT INTO sud hawa (CreateUser,CreatePassword) VALUES ('$CreateUser', '$CreatePassword')");
    }

    ?>
     

    nismok

    Well-known member
  • Jun 27, 2008
    9,377
    672
    113
    Last edited:

    BIG BOSSMAN

    Well-known member
  • Jan 27, 2010
    1,271
    116
    63
    බුදුන්ගේ දේශය
    first, did you check email address correctly? do you know how to check entered line is a email or just a sentence/number simply not a email? get it right otherwise it'll give error when your system sending a email to user's address because of given email address is not a really a email address :lol:

    there is a inbuilt function called mail(), order is email, subj and your message :yes:
     

    nismok

    Well-known member
  • Jun 27, 2008
    9,377
    672
    113
    machan arakatama akathu karala sampurna karala denna barida:confused::confused::confused::confused::confused::confused::confused::confused::confused:

    Code:
    <?php
    $First = $_POST["FirstName"];
    $Last = $_POST["LastName"];
    $Email = $_POST["Email"];
    $Company = $_POST["CompanyName"] ;
    $Address = $_POST["Address"] ;
    $Postal = $_POST["PostalCode"] ;
    $CreateUser = $_POST["CreateUser"] ;
    $CreatePassword = $_POST["CreatePassword"] ;
    $Country = $_POST["Country"] ;
    if (empty($_POST["CreateUser"]))
    {
    echo "Enter All";
    }
    
    else
    {
    
    echo "Your Application has Sent..." . "<br>" . "<br>" ;
    echo "Your Details :" . "<br>";
    echo $First . "<br>";
    echo $Last . "<br>";
    echo $Email . "<br>" ;
    echo $Company . "<br>";
    echo $Address . "<br>";
    echo $Postal . "<br>";
    echo $CreateUser . "<br>";
    echo $CreatePassword . "<br>";
    echo $Country . "<br>";
    
    $username="sudu";
    $hostname="localhost";
    $password="1548";
    $con=mysql_connect($hostname,$username,$password);
    echo "Thank You";
    $select=mysql_select_db("good",$con);
    
    $result=mysql_query("INSERT INTO sud hawa (CreateUser,CreatePassword) VALUES ('$CreateUser', '$CreatePassword')");
    
    $to = $Email;
    $subject = "Thanks for Submitting Application";
    $body = "Thanks you";
    
    if (mail($to, $subject, $body)) {
    echo("<p>Message successfully sent!</p>");
    } else {
    echo("<p>Message delivery failed...</p>"); 
    }
    ?>
     

    nismok

    Well-known member
  • Jun 27, 2008
    9,377
    672
    113
    first, did you check email address correctly? do you know how to check entered line is a email or just a sentence/number simply not a email? get it right otherwise it'll give error when your system sending a email to user's address because of given email address is not a really a email address :lol:

    there is a inbuilt function called mail(), order is email, subj and your message :yes:

    Hmm Ya. Even SQL injection is possible ;)
     

    sudu hawa

    Well-known member
  • Dec 1, 2011
    1,630
    100
    63
    MS kiwwe message kiyana ekanam $body kiyana variable ekata ekathu karanna. Habai oya system ekata localhost eke idala mail yawanna nam tikak configuration karanna wenawa... :yes:

    message eke thamai machan podak pahadil karala denawada:D:D:D:D:D:D
     

    sudu hawa

    Well-known member
  • Dec 1, 2011
    1,630
    100
    63
    Code:
    <?php
    $First = $_POST["FirstName"];
    $Last = $_POST["LastName"];
    $Email = $_POST["Email"];
    $Company = $_POST["CompanyName"] ;
    $Address = $_POST["Address"] ;
    $Postal = $_POST["PostalCode"] ;
    $CreateUser = $_POST["CreateUser"] ;
    $CreatePassword = $_POST["CreatePassword"] ;
    $Country = $_POST["Country"] ;
    if (empty($_POST["CreateUser"]))
    {
    echo "Enter All";
    }
    
    else
    {
    
    echo "Your Application has Sent..." . "<br>" . "<br>" ;
    echo "Your Details :" . "<br>";
    echo $First . "<br>";
    echo $Last . "<br>";
    echo $Email . "<br>" ;
    echo $Company . "<br>";
    echo $Address . "<br>";
    echo $Postal . "<br>";
    echo $CreateUser . "<br>";
    echo $CreatePassword . "<br>";
    echo $Country . "<br>";
    
    $username="sudu";
    $hostname="localhost";
    $password="1548";
    $con=mysql_connect($hostname,$username,$password);
    echo "Thank You";
    $select=mysql_select_db("good",$con);
    
    $result=mysql_query("INSERT INTO sud hawa (CreateUser,CreatePassword) VALUES ('$CreateUser', '$CreatePassword')");
    
    $to = $Email;
    $subject = "Thanks for Submitting Application";
    $body = "Thanks you";
    
    if (mail($to, $subject, $body)) {
    echo("<p>Message successfully sent!</p>");
    } else {
    echo("<p>Message delivery failed...</p>"); 
    }
    ?>



    meka waradi neeeeee:sorry::sorry::sorry::sorry::sorry::sorry::sorry::sorry::sorry::sorry::sorry::sorry::sorry::sorry::sorry::sorry::sorry::sorry::(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(