A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: Contact form without php

  1. #1
    Senior Member
    Join Date
    Mar 2003
    Posts
    141

    Contact form without php

    Can anyone suggest a means to create a typical contact form without the use of php. My web host doesn't supply php on the server. I once knew of a way to do it with perl.
    All I want is a form that people fill out with their name and message and it automatically sends it to my email address.

    Thanks,
    Jason

  2. #2
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    hi,

    Does that mean that your host support perl? Because in order to acomplish this, you'll need a server side scripting language available: ASP, ColdFusion, CGI...

    perl form processing

    Move to the Scripting & Backend Forum.

  3. #3
    Senior Member
    Join Date
    Mar 2003
    Posts
    141
    It seems that my stupid server doesn't allow any server side scripting. I think I will find another location for my site.

    Thanks anyway
    Jason

  4. #4
    Breath Taking Web Designer :-P
    Join Date
    Mar 2006
    Posts
    15
    no you dont have to move your whole site to do that, you can still host your php files in another free host, there are many, i use www.awardspace.com, just use this command to send the variales to the php file you upload there

    getURL("http://[the host that supports php]/form.php, POST);

  5. #5
    Registered User
    Join Date
    Feb 2001
    Posts
    13,041
    Hi,

    comment on that: what omarfouad suggests works, but results in a html thankyou page. If you want your flash movie to show the thankyou, you will run into a flash security restriction

    Musicman

  6. #6
    Senior Member
    Join Date
    Mar 2003
    Posts
    141
    Actually, a friend of mine suggested the same thing. So I put my php file on a free server and my flash form works! BUT...
    My flash form file only works from my desktop when I test it. When I put it on my server (the original one, not the free one) it doesn't work. Any idea why? Could it be that this server, who doesn't let me use the php form, could have restrictions on sending variables to an outside source? Or is it as simple as my code is wrong or somthing (but it does work from my desktop to the free server)?

    Cheers,
    Jason

  7. #7
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    That's what Musicman told you:
    you will run into a flash security restriction
    In order to load data from another domain, you'll need a cross domain policy file.

  8. #8
    Senior Member
    Join Date
    Mar 2003
    Posts
    141
    Thank you all for your help but I don't quite understand. I've been trying out what i thought I understood but it doesn't seem to work. When I make the cross domain policy, do I place it with the php code(server1) or with my flash file(server2)? In the policy, do I put the server 1 or server 2 address?\

    Or have I got it all wrong with the XML file and I am suppose to use the php file shown here:

    http://xmlrpcflash.mattism.com/proxy_info.php

    If so then I am completely lost.

    Sorry but this is way over my head.
    Cheers,
    Jason

  9. #9
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    If you want to load data into Flash (server 2) from PHP (server 1), you'll need to add the cross domain policy file to Server 2.
    And in the crossdomain.xml you'll need to add server 2 (domain 2) as an allowed domain.

  10. #10
    Senior Member
    Join Date
    Mar 2003
    Posts
    141
    Thanks. Your explanation could not have been clearer. But I thought I was sending variables from my flash site (server 2) to my php file (server1) so that the php file could send out an email to me? Is that wrong? I got this contact form from here:

    http://www.kirupa.com/developer/acti..._php_email.htm

    Cheers,
    Jason

  11. #11
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    That depends on how you do it, which Flash/Flash Player version you're using...

    According to the tutorial (which seems to be really old - Flash 5 style), MovieClip.loadVariables is used.
    In SWF files running in a version earlier than Flash Player 7, url must be in the same superdomain as the SWF file that is issuing this call. A superdomain is derived by removing the left-most component of a file's URL. For example, a SWF file at www.someDomain.com can load data from a source at store.someDomain.com because both files are in the same superdomain of someDomain.com.

    In SWF files of any version running in Flash Player 7 or later, url must be in exactly the same domain as the SWF file that is issuing this call. For example, a SWF file at www.someDomain.com can load data only from sources that are also at www.someDomain.com. To load data from a different domain, you can place a cross-domain policy file on the server hosting the data source that is being accessed.
    See, there are some restrictions.

    If you're using MX or later, you should use the LoadVars Class, along with sendAndLoad(), use the text property of the text field instead of VAR...

    loadVariables is used to load data, but it also sends data, so, you can use it to send or send and load data. Therefore, depending on the Flash/Flash Player version you may not be able to load data from another domain, or you have to use the cross domain policy file.

    Pay close attention to the documentation, but, once again, if you're using Flash MX or later, the LoadVars Class is the easier way to go.

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