PDA

View Full Version : emailing a form


binkyboo
07-01-2003, 07:42 PM
Here's the code I have on my html page.

<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<FORM METHOD=POST ACTION="http://www.minihttpserver.net/test.php">
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" align="center" width="241"> <TR> <TD VALIGN="TOP" height="2" colspan="2">


<input type="hidden" name="yname" value="WebMaster">
<input type="hidden" name="yemail" value="patrick.wirth@tdstelecom.com">
<!-- Replace the RED STRING to your email address -->

Contact us <br>
<!-- Replace the RED STRING to your top title -->

</TD> </TR> <TR>
<TD VALIGN="TOP" width="88"><font size="2">Your Name:</font></TD>
<TD VALIGN="TOP" width="174"><font size="2">
<INPUT TYPE="text" NAME="fname">
</font></TD> </TR> <TR>
<TD VALIGN="TOP" width="88"><font size="2">Your Email:</font></TD>
<TD VALIGN="TOP" width="174"><font size="2">
<INPUT TYPE="text" NAME="femail">
</font></TD> </TR> <TR> <TD VALIGN="TOP" COLSPAN="2"> <hr>
<font size="2">Suggest:</font></TD>
</TR> <TR> <TD VALIGN="TOP" COLSPAN="2"><font size="2">
<TEXTAREA NAME="comments" ROWS="5" COLS="40"></TEXTAREA>
</font></TD> </TR> <TR> <TD VALIGN="TOP" COLSPAN="2">
<div align="right"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> <td width="41%"> <div align="center"><font size="1" face="Arial, Helvetica, sans-serif"><a href="http://www.minihttpserver.net/free-email/index.php">Send by
MiniEmail</a></font></div> </td> <td width="59%">
<div align="right"><font size="2"> <input type="submit" name="action" value="Send to WebMaster"> </font></div> </td> </tr> </table>
<font size="2"> </font></div> </TD> </TR> </TABLE> </FORM>

</head>

I'd like to build a Flash form but don't know what variables I need to send to http://www.minihttpserver.net/free-email/index.php. It appears that I need yname, yemail, and femail. Any suggestions on converting this to Flash?

Colin Campbell
07-01-2003, 07:44 PM
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<?php
<FORM METHOD=POST ACTION="http://www.minihttpserver.net/test.php">
?>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" align="center" width="241"> <TR> <TD VALIGN="TOP" height="2" colspan="2">


<input type="hidden" name="yname" value="WebMaster">
<input type="hidden" name="yemail" value="patrick.wirth@tdstelecom.com">
<!-- Replace the RED STRING to your email address -->

Contact us <br>
<!-- Replace the RED STRING to your top title -->

</TD> </TR> <TR>
<TD VALIGN="TOP" width="88"><font size="2">Your Name:</font></TD>
<TD VALIGN="TOP" width="174"><font size="2">
<INPUT TYPE="text" NAME="fname">
</font></TD> </TR> <TR>
<TD VALIGN="TOP" width="88"><font size="2">Your Email:</font></TD>
<TD VALIGN="TOP" width="174"><font size="2">
<INPUT TYPE="text" NAME="femail">
</font></TD> </TR> <TR> <TD VALIGN="TOP" COLSPAN="2"> <hr>
<font size="2">Suggest:</font></TD>
</TR> <TR> <TD VALIGN="TOP" COLSPAN="2"><font size="2">
<TEXTAREA NAME="comments" ROWS="5" COLS="40"></TEXTAREA>
</font></TD> </TR> <TR> <TD VALIGN="TOP" COLSPAN="2">
<div align="right"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> <td width="41%"> <div align="center"><font size="1" face="Arial, Helvetica, sans-serif"><a href="http://www.minihttpserver.net/free-email/index.php">Send by
MiniEmail</a></font></div> </td> <td width="59%">
<div align="right"><font size="2"> <input type="submit" name="action" value="Send to WebMaster"> </font></div> </td> </tr> </table>
<font size="2"> </font></div> </TD> </TR> </TABLE> </FORM>

</head>


Try that, I have no idea :p

CyanBlue
07-01-2003, 07:53 PM
Hahaha... colin is right... binkyboo is bad!!! :p

Well... Creating a form in Flash isn't that hard as you know already... Just create input text fields in right number with appropriate headings for each inputs... And when the input is done, just do some error checking like if the field is empty or if email address contains '@' and '.' to make sure that is the right form and such...
In other words, create visually the same form as the HTML one, and give the same variable names to send them to the PHP script...

I don't think you have problem with that part... Where is the part you are having problem with, binkyboo??? :)

binkyboo
07-01-2003, 07:53 PM
The form works well. What I'm trying to do is convert this form to a Flash form.

binkyboo
07-01-2003, 07:56 PM
Cyan,

This is a free email service. What I'm trying to do is convert this form to a Flash form. I need to send the necessary variables to the php page on the hosts site (so that they wouldn't be able to tell if it's coming from a html page or from Flash).

Here's what I have on the submit button in Flash. Maybe this is where the problem lies (yes I know I'm using older script).

on (release) {
loadVariablesNum("http://www.minihttpserver.net/free-email/index.php", 0, "POST");
gotoAndStop(2);
}

CyanBlue
07-01-2003, 08:01 PM
Um... One quick question...

Does your Flash movie sitting in the same server as www.minihttpserver.net ??? I mean do I see the domain restriction problem here or not???

binkyboo
07-01-2003, 08:08 PM
Cyan,

My Flash file does not sit on that server. That server merly serves to redirect my form information to a delegated email box. Does that help? If I simply use the html version I can send out emails from any location and it eventually ends up in my email box. Shouldn't I be able to do that with a Flash form as long as I'm posting to the necessary middleware page?

binkyboo
07-01-2003, 08:12 PM
Maybe having the actual files will help.

CyanBlue
07-01-2003, 08:17 PM
Before downling the file... :DShouldn't I be able to do that with a Flash form as long as I'm posting to the necessary middleware page?You know what domain restriction I am talking about, right??? Yes... As long as you are calling the server side script that redirects the output to the appropriated page, yes...

I'll see what sort of goodies are in the file and eat all of them... :D

CyanBlue
07-01-2003, 08:29 PM
After downloading the file... ;)

I have checked out the form, and I don't see any problem with the form itself... Are you having problem with redirection??? See this page then... This page tells you how to avoid this domain restriction...
http://www.macromedia.com/support/flash/ts/documents/load_xdomain.htm

If this is not the case, obviously, I am not understanding your problem... :D

binkyboo
07-01-2003, 09:05 PM
Cyan,

Thanks for you help but I'm not making much progress. My Flash form should work like the html form but unfortunately I'm hung up. Oh well, I'll keep plugging away. Again thanks for you help.

CyanBlue
07-01-2003, 09:14 PM
Um... Can you show me the content of your PHP file???

binkyboo
07-01-2003, 10:24 PM
Cyan,

I don't know the content, it's a free service.