The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.

Page 1 of 2 12 LastLast
Results 1 to 15 of 17

Thread: I need help with a Very Very Simple PHP !!!

  1. #1

    I need help with a Very Very Simple PHP !!!

    Hi friends,

    I would like someone to help me with this php script, i have created a mailing php script attached with a flash file as it sends emails. But i want it to appear like this:

    Name: the name typed
    Email: the email typed
    GSM: the gsm typed

    As the above it should appear in my body of the message can someone help me out...

    Thanks check the attached file...
    Regards.
    Attached Files Attached Files

    ...interactive designing
    Buy templates, flash websites for a very low price & you
    can also learn with our different tutorials for free
    Vist our new site: www.earnrr.com

  2. #2
    i don't think anyone's going to download a zip about php mail. my advice is to post your php code within [php]the coe[/php] tags.

  3. #3
    Yes. I'd rather just see the code than downloading a .zip file that might be infected or something.
    COLOURlovers | Member #2 of the kirupa XBox 360 Club
    "I think most people would agree that your computer breaking is a Christmas miracle." ~shane-c to Timmytots

  4. #4

    Let me know as my thread above:

    Hi,

    Thanks for replying me, I have the PHP code below:

    PHP Code:
    <?
     
       $to 
    "newsletter@emc-oman.com";
       
    $msg "$name";
      
    mail($to$subject$msg"From: $email \nReply-To: $email\n");
    ?>

    And this is the Flash Script i kept in the button of Submit:

    Code:
     
    on (release)
    {
        if (title eq "" || name eq "" || subject eq "" || email eq "" || gsm eq "")
        {
            gotoAndStop("error");
        }
        else
        {
            loadVariablesNum("mail.php", 0, "POST");
            gotoAndStop(2);
        } // end else if
    }

    Or you can download the fla to check how the scripting is done.



    Thanks a lot again,
    Regards,
    Ibrahim.
    Attached Files Attached Files

    ...interactive designing
    Buy templates, flash websites for a very low price & you
    can also learn with our different tutorials for free
    Vist our new site: www.earnrr.com

  5. #5
    One of the problems is your need to define $to, $subject, $email, and $msg, and instead of using "From: $email" do 'From: ' . $email.
    COLOURlovers | Member #2 of the kirupa XBox 360 Club
    "I think most people would agree that your computer breaking is a Christmas miracle." ~shane-c to Timmytots

  6. #6
    But $to, $subject, $email and $msg is already defined in the PHP Script...

    I din't exactly get you if your telling me in the Flash scripting or the PHP.

    Kindly let me know exactly...

    Thanks,
    Regards.

    ...interactive designing
    Buy templates, flash websites for a very low price & you
    can also learn with our different tutorials for free
    Vist our new site: www.earnrr.com

  7. #7
    By using the Flash I want the fla file to use the PHP to send me the details to my email address by having example in the body like this:

    Name: abc
    GSM: 95458745874

    And the Form should be his EMAIL ADDRESS and the SUBJECT should be according to what he selected in the flash file...

    Thanks,
    Regards.

    ...interactive designing
    Buy templates, flash websites for a very low price & you
    can also learn with our different tutorials for free
    Vist our new site: www.earnrr.com

  8. #8
    Before you start with all the Flash stuff, try getting the PHP mail part to work first. Just make a simple HTML page with a form sending the variables through POST to the PHP, then get the POST variables and use those to send a test email to make sure it works. If that works, then go on and do the Flash part, if it doesn't, tell us.
    COLOURlovers | Member #2 of the kirupa XBox 360 Club
    "I think most people would agree that your computer breaking is a Christmas miracle." ~shane-c to Timmytots

  9. #9
    I actually can't do it in HTML using the PHP because if i keep the textbox for the name and for the gsm number but the main problem i am having is the when i try to keep 2 buttons like to subscribe and unsubscribe i can't because we can't keep 2 buttons for 1 form in HTML or to make a radio button in which we can select to Subscribe and Unsubscribe and just have a submit button to send using the PHP.

    This was the real reason i was not using HTML but in the beginning the PHP was sending mails with the Flash, as it was easier for me since i kept a selection button for Subscribe and Unsubscribe which is sent as Subject.

    If you can help me with the flash to send using the PHP or I can also use HTML form to send using the PHP but it should have 2 radio buttons so we can select.

    I would appreciate your kind help!

    Thanks,
    Regards.

    ...interactive designing
    Buy templates, flash websites for a very low price & you
    can also learn with our different tutorials for free
    Vist our new site: www.earnrr.com

  10. #10
    I'm just trying to understand what you want help with, the PHP mail function works fine, but you need help getting Flash to send all the stuff to PHP?
    COLOURlovers | Member #2 of the kirupa XBox 360 Club
    "I think most people would agree that your computer breaking is a Christmas miracle." ~shane-c to Timmytots

  11. #11
    The PHP sends me everything but i want it to send the gsm..etc in the body.

    I also have problem with the Flash, i hope you understand me at this point.


    Thanks,
    Regards.

    ...interactive designing
    Buy templates, flash websites for a very low price & you
    can also learn with our different tutorials for free
    Vist our new site: www.earnrr.com

  12. #12

    PHP Code:
    <?php 
       $to 
    "you@youremail.com"
       
    $title $_POST['title']; 
       
    $name $_POST['name']; 
       
    $subject $_POST['subject'];
       
    $email $_POST['email']; 
       
    $gsm $_POST['gsm']; 
       if (
    $email == ""){
          
    $email "No address given.";
       };
       
    $headers 'From:'.$email "\r\n" .'Reply-To: '.$email "\r\n" 'X-Mailer: PHP/' phpversion();
       
    $body "Name: $name\n Email: $email\n GSM:\n $gsm"
       
    mail($to$subject$body$headers); 
    ?>
    ActionScript Code:
    this.onRelease = function(){
    if (title == "" || name == "" || subject == "" || email == "" || gsm == ""){
    gotoAndStop("error");
    }else{
    var sendMail:LoadVars = new LoadVars();
    sendMail.title = title
    sendMail.name = name
    sendMail.subject = subject
    sendMail.email = email
    sendMail.gsm = gsm
    sendMail.sendAndLoad("mail.php", sendMail , "POST");
    sendMail.onLoad = function(){
    trace("Sent");
    gotoAndStop(2);
    }
    }
    }
    Last edited by JoshuaJonah; January 21st, 2007 at 01:21 AM.


    member #1 of the "XML-is-a-crutch-to-make-people-feel-elite-club"
    K-Emmys-06: Best Quote K-Emmys-06: Flash Genious

  13. #13
    yer welcome


    member #1 of the "XML-is-a-crutch-to-make-people-feel-elite-club"
    K-Emmys-06: Best Quote K-Emmys-06: Flash Genious

  14. #14
    I kept PHP code in the mail.php but the ActionScript for the Submit button how should i actually keep it. I kept it like this

    on (release) {
    if (title == "" || name == "" || subject == "" || email == "" || gsm == "") {
    gotoAndStop("error");
    } else {
    var sendMail:LoadVars = new LoadVars();
    sendMail.title = title;
    sendMail.name = name;
    sendMail.subject = subject;
    sendMail.email = email;
    sendMail.gsm = gsm;
    sendMail.sendAndLoad("http://www.unitechoman.com/myform1/mail.php", sendMail, "POST");
    sendMail.onLoad = function() {
    trace("Sent");
    gotoAndStop(2);
    };
    }
    }



    But it doesn't work.

    Kindly let me know how..
    Attached Files Attached Files
    Last edited by designursite; January 21st, 2007 at 01:30 PM.

    ...interactive designing
    Buy templates, flash websites for a very low price & you
    can also learn with our different tutorials for free
    Vist our new site: www.earnrr.com

  15. #15
    1. There's a linkage issue, you are putting your code on the button, no "title" actually is "this._parent.title", because the title is not within the button, understand?
    This also affects the if statement and all items must be referred to as "this._parent.whatever".

    2. There are no instance names on your input textboxes

    3. There is no code on your checkboxes

    4. Your not using all the things in the AS, just: name, email, and GSM.
    Last edited by JoshuaJonah; January 21st, 2007 at 10:38 PM. Reason: finished answering


    member #1 of the "XML-is-a-crutch-to-make-people-feel-elite-club"
    K-Emmys-06: Best Quote K-Emmys-06: Flash Genious

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012