PDA

View Full Version : Sending a form from flash site to my email..


BarryM
3rd March 2007, 10:18 PM
hi folks slowly im getting there, i have a form on my website, allegedly if u fill out the name box, email box and comments box, and hit submit button, it emails me the name of person, their email addy and comment. (submit button had code added to it)

NOW I am getting an email sent to my email client (im happy this far) but all i have is that its "FROM n " the subject title is perfect cos ive set that up in php and in the body of hte mail i have

Name:
Email:
Comments:

all empty. so im not sure if im linking the boxes on the form to the submit button right or somethign wrong with teh code.

The code for the flash button to submit the text via email is
"""""""""""""""""""""""""""""""""""""""""""""""""""""
on (release) {

// logical operator makes sure the textfield is not blank. IndexOf checks for "@" and "." characters in textfield

if (!email.length || email.indexOf("@") == -1 || email.indexOf(".") == -1) {

results = "Please check your e-mail address.";

} else if (!comments.length) {

results = "Please enter your comments.";

} else if (!name.length) {

results = "Please enter your name.";

} else {

loadVariablesNum ("http://www.bmp.future-online.co.uk/mailform.php", 0, "GET");

results = "Sending Data...";

}

}

"""""""""""""""""""""""""""""""""""""""""""""""""""""""

and the mailform php is

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
<?php

$TextVariable = '&results=';

$response = 'Data Sent. Thank You..';

echo $TextVariable;

echo $response;

/* recipients */

$recipient .= "barry@barrymoirphotography.co.uk" ;

/* subject */

$subject = "website query";

/* message */

$message .= "Name: $name

Email: $email


Comments: $commentsn";

/* additional header pieces for errors, From cc's, bcc's, etc */

$headers .= "From: $name <$email>n";





/* and now mail it */

mail($recipient, $subject, $message, $headers);

?>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

anyone got any ideas at all, im starting to think that the 3 text boxes on the actual form are not linking to the actual submit button if that makes sense.

any help really appreciated.

BarryM
4th March 2007, 12:39 PM
sorted now just ignore. turns out the fields all had to be united into one so the send button had something to look at. ?????