Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Contact - email submitter

Posted on 2003-12-06
15
Medium Priority
?
267 Views
Last Modified: 2010-04-03
I have four main fields i need to submit to email.

name (text)
email (email)
message (main body)
message subject (this is selectable from radio buttons)

how do i submit all this lot to an email address?


0
Comment
Question by:volatile
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 6
15 Comments
 
LVL 9

Expert Comment

by:OBCT
ID: 9890510
For this you will need to use a server side script. The one I use is php.
Give all your fields var names like....name, email, message, subject.
Now you can add this code onto your send button:

on(release) {
     myEmail = new LoadVars();
     myEmail.name = name.text;
     myEmail.email = email.text;
     myEmail.subject = subject.text;
     myEmail.message = message.text;
     myEmail.load("http://www.yourwebsite.com/yourfolder/mail.php", myEmail, "POST");
     myEmail.onLoad = function (success) {
          if (success) {
               mytextbox = "The email has been sent";
          } else {
               mytextbox = "An error has occured";
          }
     }
}

Now for your php script:

<?PHP
$name = $_POST['name'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$message = $_POST['message'];

mail($email, $subject, $message, $name);
?>

Make sure you name that file "mail.php"
If this doesn't work then have a look at this tutorial.
http://www.actionscript.org/tutorials/intermediate/php_send_mail/index.shtml

Cheers

-OBCT
0
 
LVL 9

Expert Comment

by:OBCT
ID: 9975848
volatile,

How is your project going? Is there anything else I can help you with?

Cheers

-OBCT
0
 

Author Comment

by:volatile
ID: 9975865
still strugling with it.  im trying your code and variations of it.

I also need to very similar email submitters too and cant get any of them to work.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Expert Comment

by:OBCT
ID: 9975876
The first thing to check is if your webserver supports php. If not, the scripts wont work. Also php must be on a webserver before it can run.
If that doesn't fix anything, show me the code your using and we'll fix it up.

Cheers

-OBCT
0
 

Author Comment

by:volatile
ID: 9975900
this is one problem.  ive tried on servers that support php and asp

i find the asp easier to understand, but still no joy.  ill work on it over the weekend and see what comes up.  thanks man.
0
 

Author Comment

by:volatile
ID: 9989174
nah, its no good.  i need an ASP one for the above fields.  can u help man?
0
 
LVL 9

Accepted Solution

by:
OBCT earned 150 total points
ID: 9989232
Using the load vars function I showed you will work if your using asp, php etc. I don't know any asp so you'll have to post a question in the asp section:
http://www.experts-exchange.com/Web/Web_Languages/ASP/

on(release)
{
     myEmail = new LoadVars();
     myEmail.name = name.text;   //name is the name of the "name" variable in your asp page. The name.text is the var name of your input box in flash
     myEmail.email = email.text;
     myEmail.subject = subject.text;
     myEmail.message = message.text;
     myEmail.onLoad = function (success)
     {
          if (success)
          {
               mytextbox = "The email has been sent";    //mytextbox is the instance name of the dynamic text box that you want to show the status with
          }
          else
          {
               mytextbox = "An error has occured";
          }
     };
     myEmail.load("http://www.yourwebsite.com/yourfolder/mail.asp", myEmail, "POST");
}

Sorry I couldn't help you with the asp scripting.
Good luck.

Cheers

-OBCT
0
 

Author Comment

by:volatile
ID: 10234442


ok the answer didn't solve the question, but gave me a better understanding of the script.  My problem remains unresolved.  Should I have posted an A based on effort?  This place confuses me.
0
 
LVL 9

Expert Comment

by:OBCT
ID: 10234508
B: The Expert(s) provided an acceptable solution, or a link to an acceptable solution, that you were able to use, although you may have needed a bit more information to complete the task.

Your question was-

name (text)
email (email)
message (main body)
message subject (this is selectable from radio buttons)

how do i submit all this lot to an email address?


I gave the standard way to do this task using Macromedia Flash and PHP.
Here is the place to go if requiring assistance with ASP-
http://www.experts-exchange.com/Web/Web_Languages/ASP/
0
 

Author Comment

by:volatile
ID: 10234538
listen man.  I am just trying to be honest here.  I thought that was the whole point of this site.  I am giving my absolute honest opinion.  I can't believe the grief I'm getting for giving someone a grade that I thought was suitable.  What the guidelines should say is "Give everyone an A regardless".   I am really really not bothered.  Get the modifier to change it, fine, great.  This is just taking up my time now.
0
 
LVL 9

Expert Comment

by:OBCT
ID: 10234550
I appologize for causing you "grief", it was never intended. For the record, I asked for the grade to be reviewed, not changed to an A.
0
 

Author Comment

by:volatile
ID: 10248257
OBCT. I wasn't just referring to this question.  I've had a lot of feedback about my grades etc etc. My understanding of the grade system was not inline with the experts on this site, and led to some confusion.  I've had to post countless messages which have nothing to do with IT, or my problems or anything contructive at all.  This is why I was a bit fed up in the message above.  If the moderator is ready, please change the grade.

V
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question