Jump to content

simple email form..


mgmediaworks

Recommended Posts

in flash i created 4 text input fields.. name, email, subject, message

and I named the variable by the same names.. then in the send button.. I have this actionscript.  but the variables are not coming back to me.. just the field name themselves..and once I'm done Im not take back to my site..can someone tell me what has to be done here?  thanx.. as you can see..I'm lost without a paddle..

 

on (release) {

getURL("http://www.queyano.com/process.php", "", "POST");

}

 

then in process.php file on my server i have the following..

 

$recipients = "[email protected]" . ",";

$subject = "message";

 

// The following three variables are gathered from Flash

$name = $_POST['name'];

$email = $_POST['email'];

$message = $_POST['msg'];

$subject = $_POST['subject'];

 

 

// Grab todays date

$date = date("F j, Y", time());

 

// This block is the actual message that is sent in the email

$email_info .= "Below is the visitors contact info and message.\n\n";

$email_info .= "Visitor's Info:\n";

$email_info .= "-----------------------------------------\n";

$email_info .= "Name:  " . $name . "\n";

$email_info .= "Email:  " . $email . "\n";

$email_info .= "Date Sent:  " . $date . "\n\n";

$email_info .= "Message\n";

$email_info .= "-----------------------------------------\n";

$email_info .= "" . $message . "\n";

 

$mailheaders = "From: " . $email . "\n";

$mailheaders .= "Reply-To: " . $email . "\n\n";

 

if(mail($recipients, $subject, $email_info, $mailheaders)) {

// Print a success for Flash to know the email is being sent

print "thank you";

}

 

?>

Link to comment
https://forums.phpfreaks.com/topic/59370-simple-email-form/
Share on other sites

ok.. I put another script up there.. I remembered I did another site a while back..

 

but

 

so I have flash file 

I have a field called subject (where the visitor will enter there email)

then I have the field called Body (where the visitor enters there comments)

problem is that in the subject field when visiting the site i cannot enter the (@) key or anything I have to shift and click on the numbers on the keyboard.. funny thing is i used the same script before and it works fine on my other site....

 

also forms--does all the data always come in in the email itself.. cause i noticed it never says who its from in the from field of the email.. eventhough I had created a "from" field..but did not work.. thanx

 

here is my simple code..

<?php

 

$From = $_POST['From'];

$subject = $_POST['subject'];

$body = $_POST['body'];

 

mail (  ' [email protected] ' , $subject, $body, 'From: ' . $email );

 

header( 'Location: http://www.queyano.com' );

 

?>

Link to comment
https://forums.phpfreaks.com/topic/59370-simple-email-form/#findComment-295460
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.