A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: e-mail in flash using php?

  1. #1
    Senior Member
    Join Date
    Jan 2004
    Posts
    461

    e-mail in flash using php?

    hey,

    I made this simple e-mail form in flash using this tutorial:

    http://codewalkers.com/tutorials.php?show=10

    so....my question is about the "send" button. First of all, what exactaly is a server? I have my own geocities domain name ( www.indiapavilion.net ). Is that a server? If not, where can i get a server from that supports php? Is it expensive? Is it hard?

    ok...so say i get a server that supports php, now...how can i make it so that when the vistor enters their info in the form and then presses the "send" button, and have that info "imported", if you will, to a certain server. Is that how it works?

    Thx, I am tyring to learn php forms and servers
    Baljinder

  2. #2
    Junior Member
    Join Date
    Apr 2004
    Location
    England
    Posts
    24
    hi!

    You've got a domain name, it's only an address. You can have your own server or you can rent one (Web Host) to hold your domain name and all data you want to share over the net. Some Web Hosters works with APACHE Servers and supports PHP and others only supports Microsoft Servers. If you want to learn about PHP you gonna need a APACHE server installed at your PC, I suggest you to get one. Have a look at WWW.apache.org and www.php.net.

    If you don't wnt to spend money with a Web Hoster and find the Apache server to compliceted to setup, www.Lycos.co.uk has a free web hoster which, supports php.

  3. #3
    Senior Member
    Join Date
    Jan 2004
    Posts
    461
    Hey,

    Thank you so much for replying. I went to lycos.com, and i got my own e-mail adress: indiapavilion@lycos.co.uk . But for some reason....the forms don't work.

    take a look at my attached files.

    this is the code i have in the .php file:

    <?php


    $myName=$_POST["myName"];
    $myAddress=$_POST["myAddress"];
    $myEmail=$_POST["myEmail"];
    $myEType=$_POST["myEType"];

    $htmlBody="<h2>Data Sent from Flash Mail Form</h2>";
    $htmlBody.="Name : $myName<br>";
    $htmlBody.="Address : $myAddress<br>";
    $htmlBody.="Email : $myEmail<br>";
    $htmlBody.="Email Type : $myEType<br>";

    $toAddress="indiapavilion@lycos.co.uk";
    $fromAddress=$myAddress;
    $subject="Flash Form Email";

    $cSend=mail($toAddress,$subject,$htmlBody,"From: $fromAddress\r\nContent-Type: text/html;charset=ISO-8859-1\r\nX-Mailer:PHP/".phpversion());//Send html email

    if($cSend){
    echo "msg=Mail Sent successfully";
    }
    else{
    echo "msg=Error occured while sending your mail";
    }

    ?>



    DO you know php??

    oh, i uploaded the file to www.geocities.com/reshamrd .

    Thx,
    Baljinder

  4. #4
    Senior Member
    Join Date
    Apr 2002
    Posts
    2,849
    A server is simply the computer you put your website on. PHP is basically a little program that a server can run on certain pages (PHP pages). So basically you need to upload your files to a computer (server) that has PHP running. Geocities and other free services usually don't have PHP running on their servers.

    A good way to see if your server is running php is to create a small PHP file that says this:

    < ?php
    phpinfo();
    ?>

    Save that file as "phptest.php" and upload it to your server. Now open a browser and to go that file (example: http://www.yourwebsite.com/phptest.php). If you see a big purple table on the screen, PHP is running. If you see a blank screen or just "phpinfo()", PHP is not running.
    Last edited by rdoyle720; 04-23-2004 at 05:13 PM.

  5. #5
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    And after all that (brinkster is one free host that supports PHP), you might find out that even if they suport PHP, they don't carry MAIL for those free hostees... So up againts another wall! You'll have to pay to get all of what you need!

    Having second thoughts about mailto:?

  6. #6
    Senior Member
    Join Date
    Jan 2004
    Posts
    461
    awwww man.

    forget servers, forget php, forget forms!!



    i'll just use the simple maito command and open up the users default e-mail system.


    Thanks for explaing servers and php though,
    Baljinder

  7. #7
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Well you could still use the form in the link I first gave you, at least it fills the fields of the user's default mail application, and you only then have to rely on him to actually hit the send button!

  8. #8
    Senior Member
    Join Date
    Jan 2004
    Posts
    461
    What a sec. oldnewbie. First of all, what was that link?




    and second, it fills the form? i didn't know that. I thought the form was useless. Because i used that link and downloaded the form. When i pressed the "send" button, my default e-mail application popped up with just the e-mail address.



    hmmmm...i'll try it. I'l just need the link.


    thx

  9. #9
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    You probably only looked at page one of that link...

    Check this...

    http://www.webthang.co.uk/tuts/tuts_...x3/gfmx3_2.asp

    Unless it doesn't work when Hotmail is your default mail application, that I wouldn't know! I use Outlook.

  10. #10
    Senior Member
    Join Date
    Jan 2004
    Posts
    461
    yea, i don't think it works with hotmail, because i use hotmail.


    thx.

  11. #11
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Think all the ones that would send you an e-mail have Hotmail as their default mail application? Or do you only intend this for you to send yourself some e-mails?

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center