Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Need Help With Contact Flash Form

  1. #1
    Join Date
    Nov 2007
    Location
    Denmark
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Need Help With Contact Flash Form

    can any one telle me whats wrong with my script? The flash contact form can be found on my website ...http://tistrup-poker-klub.dk/pokerclub.swf
    under the KONTAKT link

    this is the script for the "send Button"
    on (rollOver)
    {
    this.gotoAndPlay("s1");
    }
    on (rollOut)
    {
    this.gotoAndPlay("s2");
    }
    on (release)
    {
    _parent.getURL("contact.php","_blank","GET");
    _parent.name = "Navn:";
    _parent.email = "E_mail:";
    _parent.phone = "Telefon:";
    _parent.message = "Besked:";
    }


    And this is for the "Clear button"
    on (rollOver)
    {
    this.gotoAndPlay("s1");
    }
    on (rollOut)
    {
    this.gotoAndPlay("s2");
    }
    on (release)
    {
    _parent.name = "Navn:";
    _parent.email = "E-mail:";
    _parent.phone = "Telefon:";
    _parent.message = "besked:";
    }


    AND THIS IS THE main "contact.php" script
    <?php

    $Navn = $_GET['name'];
    $E-mail = $_GET['email'];
    $Telefon = $_GET['phone'];
    $Besked = $_GET['message'];

    $recipient_email = "info@tistrup-poker-klub.dk";

    $subject = "from" . $E-mail;
    $headers = "From" . $Navn; . "<" . $E-mail . ">\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1';

    $content = "<html><head><title>Contact letter</title></head><body><br>";
    $content .= "name: <b>" . $Navn . "</b><br>";
    $content .= "email: <b>" . $E-mail . "</b><br>";
    $content .= "Phone: <b>" . $Telefon . "</b><br><hr><br>";
    $content .= "message: <b>" . $Besked;
    $content .= "<br></body></html>";

    mail($recipient_email,$subject,$content,$headers);
    ?>
    <html>
    <body bgcolor="#282E2C">
    <div align="center" style="margin-top:60px;color:#FFFFFF;font-size:11px;font-family:Tahoma;font-weight:bold">
    Your message was sent. Thank you.
    </div>
    </body>
    </html>
    <script>resizeTo(300, 300)</script>


    You can test it on my website http://tistrup-poker-klub.dk/pokerclub.swf
    on the (KONTAKT) link

    When i push the send button, all it dos is is opning HTTP 500 server fault

    HELP PLEASE i have been trying to figur out what is wrong for 3 days now

    regards Ronni

  2. #2
    Join Date
    Nov 2007
    Location
    Denmark
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb B.t.w

    BTW i have found out that the server my website is running on...runs PHP in safe mode.. so now i complety lost..

    Heres the URL for the servers PHP configuretion...http://one-docs.com/php5/

    keeping my fingers crossed and hoping for theres any help to get out there Folks

  3. #3
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Your Flash looks fine. The php may be wrong, although I am not the one to ask about that. I will message Twey to have a gander.

    And you really need to put the Flash in an html or php file and not directly link to the swf. There are parameters in the HTML that you need to display the swf properly.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Since - is an operator in PHP, $E-mail is not a valid identifier. Also, the convention for variable names is that they should be all lower-case, with multiple words separated by underscores.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Thanks for checking Twey
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  6. #6
    Join Date
    Nov 2007
    Location
    Denmark
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cool

    Hey thx guy for looking into to my problem.

    First of all, (not to be cocky or something) Twey, but i mean all my variablenames is lowere cases names and no multiple names eighter...eg. name,email, phone & message.

    And to you Blizzard i have of cuz made a readymade html witch have the *.pokerclub.sfw file implented in it. This was only to testing purpos i up loaded it in SWF only...

    So all theres left to do as far i can see is that the indintifier $Navn, $E-mail, $Telefon and $Besked that it is wrong, but im sure i have seen some scripts witch the indintifier was with an $E-mail as the identifier.
    But i try looking into this when i come homme from work today

    Anyway thx alot for all the help guys, as i can see u two guy sare doing a super duper job at helping guys like me, at this forum. thxthxthx
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

  7. #7
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    all my variablenames is lowere cases names
    No they aren't. They start with a capital letter ($Telefon rather than $telefon). You're right that none of them have multiple words, I was just stating the convention in that case.
    im sure i have seen some scripts witch the indintifier was with an $E-mail as the identifier.
    If you did, it was as broken as yours.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  8. #8
    Join Date
    Nov 2007
    Location
    Denmark
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Okay sorry about that Twey!

    But i thought u ment the english names (name, message, phone & email)
    The names (Navn, Telefon, E-mail & Besked) are the danish names for (name, phone, Email & message) so now you lerned somthing today too and not just me... haha

  9. #9
    Join Date
    Nov 2007
    Location
    Denmark
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Hope you can figure it out Twey

    Sorry Twey, but i think i have done everything right (no capital letters and such in the php.script).... but i still get a HTTP 500 server fault when i push the send button

    but try an look at the following picture on this sample html
    http://www.tistrup-poker-klub.dk/jpgpicture.html

    There are 4 text boxes (Navn, witch have the variable name t1_2)....and next one (Email adresse, witch have the variable name t2_2).... and the next (Telefon, witch have the variable name t3_2) and the last text....(Besked, witch have the variable name t4_2)

    Thes are the variable name i be using from now on..

    Now the script i have wrote in the Adobe CS3... first the clear button
    on (rollOver)
    {
    this.gotoAndPlay("s1");
    }
    on (rollOut)
    {
    this.gotoAndPlay("s2");
    }
    on (release)
    {
    _parent.t1_2 = "Navn:";
    _parent.t2_2 = "Email adresse:";
    _parent.t3_2 = "Telefon:";
    _parent.t4_2 = "Besked:";
    }

    Next the send button
    on (rollOver)
    {
    this.gotoAndPlay("s1");
    }
    on (rollOut)
    {
    this.gotoAndPlay("s2");
    }
    on (release)
    {
    _parent.getURL("kontakt.php","_blank","GET");
    _parent.t1_2 = "Navn:";
    _parent.t2_2 = "Email adresse:";
    _parent.t3_2 = "Telefon:";
    _parent.t4_2 = "Besked:";
    }

    And last my kontakt.php script.. ( its the same as contact.php just in danish)
    <?php

    $navn = $_GET['t1_2'];
    $email_adresse = $_GET['t2_2'];
    $telefon = $_GET['t3_2'];
    $besked = $_GET['t4_2'];

    $recipient_email = "info@tistrup-poker-klub.dk";

    $subject = "from" . $email_adresse;
    $headers = "from" . $navn; . "<" . $email_adresse . ">\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1';

    $content = "<html><head><title>Contact letter</title></head><body><br>";
    $content .= "t1_2: <b>" . $navn . "</b><br>";
    $content .= "t2_2: <b>" . $email_adresse . "</b><br>";
    $content .= "t3_2: <b>" . $telefon . "</b><br><hr><br>";
    $content .= "t4_2: <b>" . $besked;
    $content .= "<br></body></html>";

    mail($recipient_email,$subject,$content,$headers);
    ?>
    <html>
    <body bgcolor="#282E2C">
    <div align="center" style="margin-top:60px;color:#FFFFFF;font-size:11px;font-family:Tahoma;font-weight:bold">
    Your message was sent. Thank you.
    </div>
    </body>
    </html>
    <script>resizeTo(300, 300)</script>

    Hope you can figure it out Twey

  10. #10
    Join Date
    Nov 2007
    Location
    Denmark
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    maybe it have something to do with the server im posting my kontakt.php on is using php in safe mode??

Bookmarks

Posting Permissions

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