Flash mx and php

and one more thing:

if (@mail($mail_to,“subject”,
"browser= " . $BrowserType . “” .
"mediaTypes= " . $MediaTypes)
header(“Location: http://evolt.org”));

has a syntax error:

if (CONDITION
header(“Location: http://evolt.org”));

the CONDITION (@mail) is written right next to the header() command… the correct code would be:

if (@mail($mail_to,"subject", 
"browser= " . $BrowserType . "" . 
"mediaTypes= " . $MediaTypes))

header("Location: http://evolt.org"); 

I don’t want to display the content of the form, I only want to display whether the form was sent to the server and processed.

Your newest addition should do the trick.

How would php launch a java pop up??

regards

The code is producing an unexpected T string error:

<html>
<body>
<?php
$ToEmail = "northls@nbkayaking.com";

$ToSubject = “Enquiry”;

$BrowserType = $HTTP_USER_AGENT;

$MediaTypes = $HTTP_ACCEPT;

$ServerName= $REMOTE_ADDR;

$Date= date("d/F/y

H.i");

$EmailBody = "Sent By: $FirstName
Senders Email: $Email

Message Sent:
$ToComments

$BrowserType
$MediaTypes
$ServerName

$Date";

mail($ToName." <".$ToEmail.">",$ToSubject, $EmailBody, “From: “.$FirstName.” <”.$Email.">");

if (@mail($mail_to,“subject”,
"browser= " . $BrowserType . “” .
"mediaTypes= " . $MediaTypes));

header(“Location: <a href=“http://evolt.org” target=”_blank">http://evolt.org</a>");

?>
</body>
</html>

what is the variable $mail_to, maybe this is the problem, I don’t think I named a variable in flash mail_to.

Any ideas

if (@mail($mail_to,“subject”,
"browser= " . $BrowserType . “” .
"mediaTypes= " . $MediaTypes));

has no sense…

if (CONDITION)
{
do something
}
else …

what you’ve written is like:
if (CONDITION) { do nothing }

and about the $mail_to … if you don’t have any variable in flash with that name, you’ve obviously made a mistake… create that variable or change your code

about the fact that you want the user to know if your .php sent the email or not… it’s very simple…

if you want to use header() as I have seen… do something like this:

if (@mail($mail_to,“subject”,
"browser= " . $BrowserType . “” .
"mediaTypes= " . $MediaTypes))
header(“Location: http://evolt.org/success.html”);
else header(“Location: http://evolt.org/fail.html”);

and use the two pages success.html and fail.html

oh, and about the popup window… check for a tutorial on the net for the javascript command window.open() … it should explain you what you want

I really do appreciate your help and feel I am close to a conclusion. Since I last posted I have decided to try and generate a php variable if the mail was sent. I have set up flash, or I am trying to at least, to receive the value of this variable.

The code is as the attachment.

What do you think.

It is generating an error on line 26, something about an extra or uneeded =

Cheers

Could I remove the echo line of the code or is this needed??

looked over your code and corrected the syntax;

also, i must mention:


//mail($Name." <".$ToEmail.">",$ToSubject, $EmailBody, "From: ".$Name." <".$Email.">");
//don't use the mail() command twice as it will send two mails...
if(@mail(....

which i wrote you in the file…

oh, and also modified the echo() line…