PDA

View Full Version : Help Please


jtb
10-06-2003, 03:46 PM
Hi Everybody,
I have a problem in my feedback form

I got a feedback form sample FLA from the web which has the following text fields. Subject, Message and Email. And the PHP script to which this file passes the variables is
<?php
mail("mymail@server.com", $subject, $message, "From: PHPMailer\nReply-To: $from\nX-Mailer: PHP/" . phpversion());
?>
This seems to be working in my server.

But the problem is I have a different set of text fields in my feedback form as below.
Name, Address, Age, Sex, Phone, Email. I modified the above PHP script as
<?php
mail("mymail@server.com", $name, $address, $age, $sex,"$phone, $email, From: PHPMailer\nReply-To: $from\nX-Mailer: PHP/" . phpversion());
?>

This is not working.
Is there any problem in the way I modified the PHP script? If yes can anyone give me the PHP script for the above one.

I am a non programmer and I feel very difficult to do this simple PHP scripting.

Can anybody help me to solve this problem?

Thanks in advance,

JTB

butterbur
10-06-2003, 04:37 PM
Somewhere in your script you will find the variable $message being declared:
$message="blah blah";
Just include your added variables inside message

$message="
Name is $name,
address is $address,
Age is $age,
Sex is $sex,
Phone is $phone,
Email is $email";

Revert to your origional mail line and all should work.
Regards
BB

jtb
10-08-2003, 12:19 AM
Hi BB,
Thanks for your reply. I now passed all those variables in message as you told and its working perfectly:) Thanks again BB.

Regards,

JTB

ferosi
10-22-2003, 01:51 AM
Can anybody tell me what is wrong

receive the e-mail but without th e values of subject and message. Can anybody tell me what is wrong. My web hoster provider has php 4.2.2


my fla script is:

on (release) {
if (subject eq "" or message eq "" or from eq "") {
stop();
} else {
lineAdapt();
loadVariablesNum("mail.php", 0, "POST");
gotoAndStop(2);
}
}


my php scrip is:
<?php

mail("fernando.solano@eds.com", $subject, $message, "From: PHPMailer\nReply-To: $from\nX-Mailer: PHP/" . phpversion());

?>

I receive the e-mail but without th e values of subject and message. Can anybody tell me what is wrong. My web hoster provider has php 4.2.2