Jump to content

Help wth flash email form and php please cant get it working at all and if I do


Spikeysonic

Recommended Posts

What am I doing wrong? All I want is a flash and php email form working.

 

At best i get the elements emailed surrounded by all the html formatiing tags makign it impossible to head or only a few (ie messahe and phone) show up in email sent or more often nothign gets sent at all.

 

In the flash filn I have a send button with

 

onClipEvent(data){
_root.nextFrame();
}

 

actioned on the form  movie in flash

 

And

 

on(release){

form.loadVariables("email_send.php", "POST");
}

 

script on the send button.

 

The movie where the form is places has 5 fields made with input text

with

 

Instant names:

 

Inp_Name

Inp_Department

Inp_Email

Inp_Phone

Inp_Message

 

 

their variables are;

 

name

dept

email

phone

message

 

Also in the properties theya re all set to HTML rednering is set to off

 

and the webssite is www.chriscreativity.com

 

Why does it not work at all and if it does how do I loose the htmal formings crap and get it to work please

 

<strong><?php

/* ---------------------------
php and flash contact form. 
by www.MacromediaHelp.com
--------------------------- 
Note: most servers require that one of the emails (sender or receiver) to be an email hosted by same server, 
so make sure your email (on last line of this file) is one hosted on same server.
--------------------------- */
$sendTo = "chris.bruneluni@yahoo.co.uk";
$subject = "Message from chriscreativity.com";

// read the variables form the string, (this is not needed with some servers).

$headers = $_POST["name"] . $_POST["dept"] . $_POST["email"] . $_POST["phone"]; 

$message = $_POST["message"];


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

?></strong> 

 

[attachment deleted by admin]

Link to comment
Share on other sites

In what way please? I have never used php before. I was only as flash needed it, how should it be done? As said all those variables were set in flash to the input text boxes, which flash was supposed to send to the php to process them and send the info to an email.

 

 

WITHOUT all the

 

 

<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Comic Sans MS" SIZE="16" COLOR="#000000" LETTERSPACING="0" KERNING="0">AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Comic Sans MS" SIZE="16" COLOR="#000000"

 

crap...the AAAAAAAAAAAAAAAAAAAAAA was the test send

 

 

Exactly what is wrong, why and how do I fix it please

 

Link to comment
Share on other sites

<strong><?php

/* ---------------------------
php and flash contact form. 
by www.MacromediaHelp.com
--------------------------- 
Note: most servers require that one of the emails (sender or receiver) to be an email hosted by same server, 
so make sure your email (on last line of this file) is one hosted on same server.
--------------------------- */
$sendTo = "chris.bruneluni@yahoo.co.uk";
$subject = "Message from chriscreativity.com";

// read the variables form the string, (this is not needed with some servers).

$headers = $_POST["name"] . $_POST["dept"] . $_POST["email"] . $_POST["phone"]; 

$message = $_POST["message"];


mail();

?></strong> 

 

 

tried that... nothing came through it was

 

<strong><?php

/* ---------------------------
php and flash contact form. 
by www.MacromediaHelp.com
--------------------------- 
Note: most servers require that one of the emails (sender or receiver) to be an email hosted by same server, 
so make sure your email (on last line of this file) is one hosted on same server.
--------------------------- */
$sendTo = "chris.bruneluni@yahoo.co.uk";
$subject = "Message from chriscreativity.com";

// read the variables form the string, (this is not needed with some servers).

$headers = $_POST["name"] . $_POST["dept"] . $_POST["email"] . $_POST["phone"]; 

$message = $_POST["message"];


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

 

before

 

[attachment deleted by admin]

Link to comment
Share on other sites

You must have misread the documentation.

 

An example of what headers look like taken directly from the documentation I linked you to is:

 

$headers = 'From: webmaster@example.com' . "\r\n" .
    'Reply-To: webmaster@example.com' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();

 

Yours contain someones name, department, email and phone number all concatenated together in one continuous string that I imagine would look some thing like:

 

thorpedeveloperthorpe@phpfreaks.com0243677098

 

I would start by leaving the header argument out all together as not all servers are going to require it. Be aware though, that without valid headers, allot of mail will go to the trash.

Link to comment
Share on other sites

Sorry did not realise that was a link. Went through the thread but most of it is way above what I am doing. It was litterally a case of adding a email form to my second flash website. Was told I needed a php file to run it through, I have no idea what apache or mime is etc.

 

I got the basic script from a site

 

www.kirupa.com/developer/actionscript/flash_phpemail.htm

 

Then tried to adapt it for my contact page on

 

www.chriscreativity.com

 

Done in Flash CS5 Which has

 

name, dept, email, phone and message

 

as its variables posted to the php file.

 

Trying to learn from  your link I produced this...

 

But It is still not sending anythign to my email at all, let alone one with no html crap tags.

 

Where am I still going wrong please

Note this is first time trying a php script.

 

<strong><?php

/* ---------------------------
php and flash contact form. 
by www.MacromediaHelp.com
--------------------------- 
Note: most servers require that one of the emails (sender or receiver) to be an email hosted by same server, 
so make sure your email (on last line of this file) is one hosted on same server.
--------------------------- */
$sendTo = 'chris.bruneluni@yahoo.co.uk';
$subject = 'Message from chriscreativity.com';

// read the variables form the string, (this is not needed with some servers).
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

$headers = $_POST['name'] . 
'\r\n' . $_POST['dept'] .
'\r\n' . $_POST['email'] . 
'\r\n' . $_POST['phone'] .
'\r\n'. 'X-Mailer: PHP/' . phpversion(); 

$headers = 'Reply-To: chris.bruneluni@yahoo.co.uk' . '\r\n' .

$message = $_POST['message'];

$message = wordwrap($message, 70);

mail($sendTo, $subject, stripslashes($headers), stripslashes($message));

if (mail($sendTo, $subject, stripslashes($headers), stripslashes($message))) {
  echo 'mail() Success!' . "<br />\n";
}
else {
  echo 'mail() Failure!' . "<br />\n";
}
?></strong> 

 

[attachment deleted by admin]

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.