Always Confused
Flashmatic form
hey guys...
I am trying to work with a flash feedback form that i got from here: http://www.flashmatics.co.uk/ .. everything is working, except i need to add a few more fields - which i did in the flash file. but how can i get those fields to show up i the email. currently only the feedback field shows up in the email.
thanks for your help!
Prid - Outing
Hi,
you see this code:
Actionscript Code:
sendData_lv.name = name_txt.text ; sendData_lv.email = email_txt.text ; sendData_lv.feedback = feedback_txt.text ;
Just add another line with your own variable, for example:
Code:
sendData_lv.example = example_txt.text;
Notice the emphasized example variable. Open your .PHP file, and to use your sent information, use this syntax:
$_POST ['variable_name ']
where variable_name is the variable name you declared, in this case, it's example , then the code would look like this:
$_POST['example']
Now, use that wherever you want in the PHP file
Hope this helps
I am back, guys ... and finally 18 :P
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
Always Confused
i have already done that...but did not work.
flash:
sendData_lv.name = name_txt.text;
sendData_lv.email = email_txt.text;
sendData_lv.how = how_txt.text;
sendData_lv.phone = phone_txt.text;
sendData_lv.feedback = feedback_txt.text;
php:
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$how = $_POST['how'];
$phone = $_POST['phone'];
$feedback = $_POST['feedback'];
$subject = 'Message from Client';
$headers = "From: $name <$email>\n";
$headers .= "Reply-To: $name <$email>\n";
//ENTER YOUR EMAIL ADDRESS HERE
$to = 'aeliayousaf@hotmail.com';
//---------------------------
$success = mail($to, $subject, $feedback, $headers);
if($success){
echo '&sent=OK';
}else{
echo '&sent=Error';
}
?>
Prid - Outing
It's not working because you are never sending the other received variables to your email
$feedback = $_POST['feedback'];
only this one is being sent, since it's the actual message in the mail that is being sent. Just add other stuff to it, and remember that . (a dot) in PHP is the equivalent to + (plus) in Flash, so for example:
PHP Code:
$feedback = "Name: " . $name . "\n" . "How: " . $how . "\n" . "Phone: " . $phone . "\r\n" . $_POST [ 'feedback' ];
\n means linebreak
I am back, guys ... and finally 18 :P
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
Always Confused
bro i tried it, but still not working. i have attached my flash file and the php. please see what i am doing wrong.
thanks
Attached Files
Prid - Outing
Umm, something called testing it online after uploading it to your server, because it won't work offline
I am back, guys ... and finally 18 :P
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
Always Confused
Originally Posted by
Nig 13
Umm, something called testing it online after uploading it to your server, because it won't work offline
lol i did bro...i'm not that stupid lol
Prid - Outing
nah, you're not, but I tried it online and it worked for me
I am back, guys ... and finally 18 :P
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
Always Confused
really eh...like i said it works for me, but only the message field shows up...
Prid - Outing
Then have you tried re-uploading the new PHP file (or replacing it with the other one) in your server?
I am back, guys ... and finally 18 :P
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width