A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Flash > PHP email form submitting as HTML rather than plain text?

  1. #1
    Phantom Flasher... Markp.com's Avatar
    Join Date
    May 2000
    Posts
    16,034

    Lightbulb Flash > PHP email form submitting as HTML rather than plain text?

    Hi guys,

    Strange problem. I have my flash doc setup to submit an email form as a contact on a page.

    The text fields are called:
    signupname
    signupemail
    signupmobile

    They are in a movieclip called theform, when the send button is pressed it sends the form to email.php

    Code:
    on (release) {
    		theform.loadVariables("email.php", "POST");
    }
    The PHP file then sends an email to me with the details.

    The details are coming through as HTML rather than plain text. Is there a way for me to strip out the html from the text boxes, either in flash or in php?

    Currently the emails I get off the form look like:
    Code:
    Details: <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Arial\" SIZE=\"11\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\">Mark</FONT></P></TEXTFORMAT>, <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Arial\" SIZE=\"11\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\">[email protected]</FONT></P></TEXTFORMAT>, <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Arial\" SIZE=\"11\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\">07781545455</FONT></P></TEXTFORMAT>
    When it should read:
    Code:
    Details: Mark, [email protected], 07781545455
    I've tried setting the text boxes in flash with this code:
    Code:
    _root.theform.signupname.text = "";
    _root.theform.signupemail.text = "";
    _root.theform.signupmobile.text = "";
    stop();
    And also using striptags() in php, but nothing seems to work

    Some help would be great! Thanks chaps!

  2. #2
    Registered User
    Join Date
    Feb 2001
    Posts
    13,039
    Hi,

    switch to loadvars object from loadvariables().
    You will have to change from variable names to instance names for the text fields

    Musicman

  3. #3
    Phantom Flasher... Markp.com's Avatar
    Join Date
    May 2000
    Posts
    16,034
    Hi MM, thanks for the reply!

    Do you mean loadVariablesNum, as I can't find a loadvars in AS2?

    Thanks,
    Mark

  4. #4
    Bearded (M|G)od MyFriendIsATaco's Avatar
    Join Date
    Dec 2002
    Location
    Awesomeville.
    Posts
    3,045
    LoadVars

    But that's not going to solve your problem. You have HTML enabled on that text field. Check your property panel for the box with <>. It's probably pressed.

  5. #5
    Phantom Flasher... Markp.com's Avatar
    Join Date
    May 2000
    Posts
    16,034
    Thanks for the replies chaps, the [<>] button is not checked, thats the first thing I looked at!

    I'll try the loadvars

    Thanks!

  6. #6
    Registered User
    Join Date
    Feb 2001
    Posts
    13,039
    Hi,

    to clarify things: in the old days (certainly until flash 7), a text field variable would render html only if html was enabled for the text box. Later (not sure whether it was flash 8 or 9), there were a couple of posts that text variables would alwasy return html.
    Now, with loadvars, you no longer use the text field variable but rather assign an instance name to a text field ... and now you can choose between the .text and .htmlText

    Musicman

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