5 Replies Latest reply on Jun 27, 2011 11:20 AM by Chris W. Griffith

    Catalyst form not always work

    Szymon Mosiolek

      In Flash Catalyst CS5 I created site with mail form and in Flash Builder 4 added function send mail via script php. Script using POST method to sent emails. Sometimes everything work but sometimes not. Form can't send to server ang get from server content. Sometimes in all computers is work OK and sometimes only in few. Wher is the problem and what can I do to solve this problem?

        • 1. Re: Catalyst form not always work
          Chris W. Griffith Adobe Community Professional

          Usually if you are seeing something like that it is usualy one of two issues: the internet connection to the server is flasky or the data that you are passing to the form has characters that are causing the form to break. Are the variable properly encoded before you pass them to the form? Is there an issue with the server code?

           

          Hope this points in toward a solution.

           

          Chris

          • 2. Re: Catalyst form not always work
            Szymon Mosiolek Level 1

            Internet connection is good. Maybe code of site is too heavy because ther is a lot of empty transitions. Maybe if I delete thiś disused lines in code will help?

            • 3. Re: Catalyst form not always work
              Chris W. Griffith Adobe Community Professional

              I would take a look at the content that you are sending over in the form. If the content is not properly encoded, forms will break (usually silently). Things that can cause issues are ampersands, dashes, commas. and spaces. Try to see if the failures are based on content.

               

              Chris

              • 4. Re: Catalyst form not always work
                Szymon Mosiolek Level 1

                I don't use dashes, commas. and spaces. Content is passing from keyboard. Maybe something is wrong in php script code.This is my php script:

                 

                <?php
                    if( $_POST['verify'] == "catalyst" ){       
                        //adres CatalysDesign
                        $address = 'Kontakt <alkortrans@alkortrans.eu>';       
                       
                        $headerFrom ="Content-type: text/html; charset=utf-8\r\n";
                        $headerFrom .= 'From: WWW AlkorTrans <alkortrans@alkortrans.eu>';   
                       
                        $title = 'Formularz AlkorTrans';
                       
                        $content = "Wiadomość została wysłana za pośrednictwem formularza na stronie www.alkortrans.eu<br/>";
                        $content .= "Imie nazwisko: ".$_POST["name"]."<br/>";
                        $content .= "E-mail: ".$_POST["mail"]."<br/>";
                        $content .= "Telefon: ".$_POST["tel"]."<br/>";
                        $content .= "Tresc: ".$_POST["text"]."<br/>";                  

                 


                        //wyslanie maila do CatylstDesign
                        $mailSent = @mail($address, $title, $content, $headerFrom);
                       
                        //wyslanie potwierdzenie
                        @mail($_POST["mail"], "AlkorTrans potwierdzenie wysłania wiadomości", "Potwierdzenie wysłania wiadomosci.", $headerFrom);
                       
                        echo $mailSent ? "ok" : "error";
                    }
                    else
                        echo "error";

                • 5. Re: Catalyst form not always work
                  Chris W. Griffith Adobe Community Professional

                  Have you written a test html page for the form? I find when I have to write server code for my apps, I always create a basic html page that I can use to test my services and the responses within a browser.

                   

                  Chris