PDA

View Full Version : Form Script Assistance



WSBlue
06-04-2007, 03:08 PM
Hi ! Naval,
Below is script (Blue) provided by you and it works.
But when I try to apply it (Red) on another form, it doesn't work.
Could you please take a look. Thanks
<?php
// Receiving variables
@$HubNama = addslashes($_POST['HubNama']);
@$HubAlamatJalan = addslashes($_POST['HubAlamatJalan']);
@$HubAlamatKota = addslashes($_POST['HubAlamatKota']);
@$HubAlamatPropinsi = addslashes($_POST['HubAlamatPropinsi']);
@$HubAlamatKodePos = addslashes($_POST['HubAlamatKodePos']);
@$HubTelHP = addslashes($_POST['HubTelHP']);
@$HubEMail = addslashes($_POST['HubEMail']);
@$HubTanyaSaran = addslashes($_POST['HubTanyaSaran']);
// Validation
if (strlen($HubNama) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($HubAlamatJalan) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($HubAlamatKota) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($HubAlamatPropinsi) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($HubTelHP) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($HubEMail) == 0 )
{
header("Location: error.htm");
exit;
}
if (strlen($HubTanyaSaran) == 0 )
{
header("Location: error.htm");
exit;
}
//Sending Email to form owner
$pfw_header = "From: $HubEMail\n"
. "Reply-To: $HubEMail\n";
$pfw_subject = "Saran & Pertanyaan";
$pfw_email_to = "your e mail address";
$pfw_message = "HubNama: $HubNama\n"
. "HubAlamatJalan: $HubAlamatJalan\n"
. "HubAlamatKota: $HubAlamatKota\n"
. "HubAlamatPropinsi: $HubAlamatPropinsi\n"
. "HubAlamatKodePos: $HubAlamatKodePos\n"
. "HubTelHP: $HubTelHP\n"
. "HubEMail: $HubEMail\n"
. "HubTanyaSaran: $HubTanyaSaran\n";
*****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
header("Location: confirmation.htm");
?>
--------------------------------------------------------
--------------------------------------------------------
Parse error: parse error in /home/httpd/vhosts/beruang.biz/httpdocs/contactus.php on line 58

<?php
// Receiving variables
@$name = addslashes($_POST['name']);
@$company = addslashes($_POST['company']);
@$city = addslashes($_POST['city']);
@$province = addslashes($_POST['province']);
@$telhp = addslashes($_POST['telhp']);
@$email = addslashes($_POST['email']);
@$question = addslashes($_POST['question']);
// Validation
if (strlen($name) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($company) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($city) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($province) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($telhp) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($email) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($question) == 0 )
{
header("Location: error2.htm");
exit;
}
//Sending Email to form owner
$pfw_header = "From: $email\n"
. "Reply-To: $email\n";
$pfw_subject = "Contact Us";
$pfw_email_to = "you e mail address";
$pfw_message = "name: $name\n"
. "company: $company\n"
. "city: $city\n"
. "province: $province\n"
. "telhp: $telhp\n"
. "email: $email\n"
. "question: $question\n"
*****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ; 58
header("Location: confirmation2.htm");
?>

navaldesign
06-04-2007, 08:14 PM
You have missed a " ; " after . "question: $question\n" ;

Of course, delete that "58" that you have added to see which line is the line with the problem.

WSBlue
06-04-2007, 10:37 PM
You have missed a " ; " after . "question: $question\n" ;

Of course, delete that "58" that you have added to see which line is the line with the problem.

Hi! Naval,
Yes, I have corrected it.
But why, evrytime when I open site beruang.biz/contactus.htm
error pop up
X A Runtime Error has occured.
Do you wish to Debug?
Line:297
Error: Object expected

if I click No, it will go to error page, when I click back to contact us, another error pop up...
report same thing as above but ...
Line:16
Error:Expected identifier

But if I click yes, it will take forever to debug.

What shall I do? Please advise. Thank you.

navaldesign
06-05-2007, 05:01 AM
I have tried your fom and it works ok. No error messages or anything, just the php page is extremely slow to load (can't know why). As for the rest it works ok.

WSBlue
06-06-2007, 03:49 PM
I have tried your fom and it works ok. No error messages or anything, just the php page is extremely slow to load (can't know why). As for the rest it works ok.

Hi! Naval,
I did the www.beruang.biz/contactus.htm (http://www.beruang.biz/contactus.htm) , same as
how I did www.beruang.biz/hubungikami.htm (http://www.beruang.biz/hubungikami.htm) on BV.
I did validation on every field but why It can't show pop up
error message like beruang.biz/hubungikami.htm but directly
goes to www.beruang.biz/error2.htm (http://www.beruang.biz/error2.htm) if error.
Thanks for your assitance.
PJR

Andy128
06-06-2007, 05:11 PM
Might I interject a thought-

If you have both forms in the same directory and are using the same php script to process them- then when prompted for an error- the script is saying pull up error2.html to display the error.

If you want a different type/design of error page- then you will have to specify that in the script. Lets say you designed an error page and name it error10.html - then would have to put that new error message page in the php script in the appropriate space.

Hope that makes sense.

Andy

WSBlue
06-06-2007, 05:46 PM
Might I interject a thought-

If you have both forms in the same directory and are using the same php script to process them- then when prompted for an error- the script is saying pull up error2.html to display the error.

If you want a different type/design of error page- then you will have to specify that in the script. Lets say you designed an error page and name it error10.html - then would have to put that new error message page in the php script in the appropriate space.
Hope that makes sense.
Andy
Thanks, Andy, But where is the appropriate space in the php script?
Or Since, the form itself can show pop up error message,
error2.html actually will not be needed anymore, Is it right?

navaldesign
06-06-2007, 07:55 PM
On the contary. The onform validation is needed for normal users, but they will not protect you against a spammer. So, BOTH validations are needed /as i did ib your custom form): javascript for immediate alert popup, and in the script validation for spammers and upload fields (if you intend using them), as well as radio buttons and checkboxes

WSBlue
06-07-2007, 09:20 AM
On the contary. The onform validation is needed for normal users, but they will not protect you against a spammer. So, BOTH validations are needed /as i did ib your custom form): javascript for immediate alert popup, and in the script validation for spammers and upload fields (if you intend using them), as well as radio buttons and checkboxes
I don't need an upload field for this contactus form.
I only need alert pop up error message for everyfield that is missing to be filled. How can I do it, just the one on beruang.biz/hubungikami. htm. Thanks.

WSBlue
06-07-2007, 09:28 AM
Might I interject a thought-

If you have both forms in the same directory and are using the same php script to process them- then when prompted for an error- the script is saying pull up error2.html to display the error.

If you want a different type/design of error page- then you will have to specify that in the script. Lets say you designed an error page and name it error10.html - then would have to put that new error message page in the php script in the appropriate space.

Hope that makes sense.

Andy
I have two different kinds of error page.
One form doesn't show error page anymore
because it has alert pop up error message,
thus it will never go to error.html.

The other form, I also want it to do the same.
No need to go to error page,
but it always goes to error2.html,
which I don't want it to.
What shall I do; shall I delete the error2.html?

Andy128
06-07-2007, 11:04 AM
It appears that you have some form validation with Javascript. The one you are describing is a php error message type. You will have to decide which one you want and then build the form accordingly. The tutorials (Forms) should show how to set up the alert type error message with the built in validation (for each form field- look at the Validate tab in the properties window).

It is difficult to walk you through this as some coding knowledge is necessary. Perhaps using Navals DB systems and script writing service would be of benefit?

Andy

navaldesign
06-07-2007, 04:14 PM
WS, i have set your formulir form with BOTH Javascript validation (which is great for the normally expected user errors) AND validation in the php script (i have the form processed bt ABVFP), so that no spammer can override the Javascript (easily done). If anyone overrides the Javascript validation, he gets against ABVFP's validation that will not allow him to go on.

This is a good rule for all validations: have both Javascript (which is more immediate) and php (on script level) validation.

You can use the built in BV validation, as Andy has suggested. However, the one i have used for your form is a modified Javascript validation, to allow for personalized messages. BV can NOT, by itself provide this detailed validation.

If your second form always goes to the error page, it means that either you Javascript validation is wrong, so it is not activated, OR that there is a mistake in your form that the Javascript doesn't "see", but the php does, so it sends the user to the error page.

WSBlue
06-08-2007, 09:03 PM
WS, i have set your formulir form with BOTH Javascript validation (which is great for the normally expected user errors) AND validation in the php script (i have the form processed bt ABVFP), so that no spammer can override the Javascript (easily done). If anyone overrides the Javascript validation, he gets against ABVFP's validation that will not allow him to go on.

This is a good rule for all validations: have both Javascript (which is more immediate) and php (on script level) validation.

You can use the built in BV validation, as Andy has suggested. However, the one i have used for your form is a modified Javascript validation, to allow for personalized messages. BV can NOT, by itself provide this detailed validation.

If your second form always goes to the error page, it means that either you Javascript validation is wrong, so it is not activated, OR that there is a mistake in your form that the Javascript doesn't "see", but the php does, so it sends the user to the error page.

LOL! I thought I got it but NO!
I opened with Notepad and went through page www.beruang.biz/contactus.htm (http://www.beruang.biz/contactus.htm) and found out all Editboxes (1,2,3... ...) were left empty so I named them one by one; Editbox1,2,3... and TextArea1, just like www.beruang.biz/hubungikami.htm (http://www.beruang.biz/hubungikami.htm)
But form contactus still can't show pop up error mesaage but connect to contactus.php then show up error2.htm
And I also found out this additional script
<STYLE type=text/css>IMG {
BEHABIOUR:url("pngfix.***")
}
at hubungikami that didn't show at contactus, so I inserted them at the same position shown in hubungikami at contactus page.
But I fail, I can make it like what Naval did.
Naval, can you please help to see what went wrong in it ? Thank you.

navaldesign
06-09-2007, 03:50 PM
The form has to be built from scratch. If this is the original form you had, built in BV8 the validation will probably not work.

WSBlue
06-13-2007, 09:27 PM
The form has to be built from scratch. If this is the original form you had, built in BV8 the validation will probably not work.
Hi! Naval,
I have managed to show pop up error message when every field is missing or incorrect. BUT even after every field is filled and correct, it still goes to error page. Could you please check it out, where goes wrong?
www.beruang.biz/contactus.htm (http://www.beruang.biz/contactus.htm)

I compare it with www.beruang.biz/hubungikami.htm (http://www.beruang.biz/hubungikami.htm) .
I can't find their php script has any differences.
But this one can always go to thank you page.
Thanks a lot.

navaldesign
06-13-2007, 09:49 PM
Probably your script is looking for some field that doesn't exist. I can't know, because the php code is not visible.

WSBlue
06-13-2007, 10:02 PM
Probably your script is looking for some field that doesn't exist. I can't know, because the php code is not visible.
<?php
// Receiving variables
@$name = addslashes($_POST['Name']);
@$company = addslashes($_POST['Street']);
@$city = addslashes($_POST['City']);
@$province = addslashes($_POST['Province']);
@$telhp = addslashes($_POST['TelHP']);
@$email = addslashes($_POST['EMail']);
@$question = addslashes($_POST['Message']);
// Validation
if (strlen($Name) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($Street) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($City) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($Province) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($TelHP) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($EMail) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($Message) == 0 )
{
header("Location: error2.htm");
exit;
}
//Sending Email to form owner
$pfw_header = "From: $email\n"
. "Reply-To: $email\n";
$pfw_subject = "Contact Us";
$pfw_email_to = "xxxxx@xxxxx. com";
$pfw_message = "Name: $Name\n"
. "Street: $Street\n"
. "city: $city\n"
. "Province: $Province\n"
. "Tel HP: $TelHP\n"
. "E Mail: $EMail\n"
. "Message: $Message\n";
*****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
header("Location: confirmation2.htm");
?>

Andy128
06-14-2007, 04:34 AM
Ok-

None of your variables match your form fields. This script will not work with that form.

Go back to the drawing board- start over. Build if from scratch as Naval suggested. Make sure he variables, form fields and php script all match up. It is case sensitive. Therefore Name and name are two different things as far as the script is concerned.

Andy

navaldesign
06-14-2007, 05:46 AM
Could not have explained it better.

WSBlue
06-14-2007, 08:13 PM
I have corrected and check and recheck but still goes to error page.
Could you please tell me, what still goes wrong? Thank you.

<?php
// Receiving variables
@$Name = addslashes($_POST['Name']);
@$Street = addslashes($_POST['Street']);
@$City = addslashes($_POST['City']);
@$Province = addslashes($_POST['Province']);
@$TelHP = addslashes($_POST['TelHP']);
@$EMail = addslashes($_POST['EMail']);
@$Message = addslashes($_POST['Message']);
// Validation
if (strlen($Name) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($Street) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($City) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($Province) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($TelHP) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($EMail) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($Message) == 0 )
{
header("Location: error2.htm");
exit;
}
//Sending Email to form owner
$pfw_header = "From: $EMail\n"
. "Reply-To: $EMail\n";
$pfw_subject = "Contact Us";
$pfw_email_to = "xxxx@xxx.kom (xxxx@xxx.kom)";
$pfw_message = "Name: $Name\n"
. "Street: $Street\n"
. "City: $City\n"
. "Province: $Province\n"
. "TelHP: $TelHP\n"
. "EMail: $EMail\n"
. "Message: $Message\n";
*****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
header("Location: confirmation2.htm");
?>

navaldesign
06-14-2007, 09:04 PM
You have not checked correctly:

the email field is "E Mail" in the form, "Email" in the script.
The Telephone is "Tel HP" in the form, "TelHP" in the script.
"Post Code": it exists in the form, but not in the script.

ALL variables should be the same between form and script. Copy the script from here:


<?php
// Receiving variables
@$Name = addslashes($_POST['Name']);
@$Street = addslashes($_POST['Street']);
@$City = addslashes($_POST['City']);
@$Province = addslashes($_POST['Province']);
@$PostCode = addslashes($_POST['Post Code']);
@$TelHP = addslashes($_POST['Tel HP']);
@$EMail = addslashes($_POST['E Mail']);
@$Message = addslashes($_POST['Message']);
// Validation
if (strlen($Name) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($Street) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($City) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($Province) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($TelHP) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($EMail) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($Message) == 0 )
{
header("Location: error2.htm");
exit;
}
//Sending Email to form owner
$pfw_header = "From: $EMail\n"
. "Reply-To: $EMail\n";
$pfw_subject = "Contact Us";
$pfw_email_to = "xxxx@xxx.kom (xxxx@xxx.kom)";
$pfw_message = "Name: $Name\n"
. "Street: $Street\n"
. "City: $City\n"
. "Province: $Province\n"
. "Post Code: $PostCode\n"
. "Tel HP: $TelHP\n"
. "Email: $EMail\n"
. "Message: $Message\n";
*****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
header("Location: confirmation2.htm");
?>

WSBlue
06-15-2007, 12:38 PM
You have not checked correctly:

the email field is "E Mail" in the form, "Email" in the script.
The Telephone is "Tel HP" in the form, "TelHP" in the script.
"Post Code": it exists in the form, but not in the script.

ALL variables should be the same between form and script. Copy the script from here:


<?php
// Receiving variables
@$Name = addslashes($_POST['Name']);
@$Street = addslashes($_POST['Street']);
@$City = addslashes($_POST['City']);
@$Province = addslashes($_POST['Province']);
@$PostCode = addslashes($_POST['Post Code']);
@$TelHP = addslashes($_POST['Tel HP']);
@$EMail = addslashes($_POST['E Mail']);
@$Message = addslashes($_POST['Message']);
// Validation
if (strlen($Name) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($Street) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($City) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($Province) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($TelHP) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($EMail) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($Message) == 0 )
{
header("Location: error2.htm");
exit;
}
//Sending Email to form owner
$pfw_header = "From: $EMail\n"
. "Reply-To: $EMail\n";
$pfw_subject = "Contact Us";
$pfw_email_to = "xxxx@xxx.kom (xxxx@xxx.kom)";
$pfw_message = "Name: $Name\n"
. "Street: $Street\n"
. "City: $City\n"
. "Province: $Province\n"
. "Post Code: $PostCode
. "Tel HP: $TelHP\n"
. "Email: $EMail\n"
. "Message: $Message\n";
*****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
header("Location: confirmation2.htm");
?>

I copied your script above, but received report:
Parse error: parse error in /home/httpd/vhosts/beruang.biz/httpdocs/contactus.php on line 57
I tried to correct it but still not ok.
. "Tel HP: $TelHP\n"
(any different has space in between)
I used EMail and TelHP in the form and also the script.

Did I do any wrong again. Please help. Thank you.

navaldesign
06-15-2007, 01:27 PM
Sorry, my mistake, i have edited it. Copy again the script and repeat the procedure.

WSBlue
06-15-2007, 06:54 PM
Sorry, my mistake, i have edited it. Copy again the script and repeat the procedure.

Hi! Naval,
I'm sorry to keep bothering you.
I have tried both scripts below ( One with blue text, was the first one, you provided. And the other with red text, was the one when I replied).
But both still go to error page even after all fields had been filled.
I rechecked and rechecked but still not good enough, could make it work/ go to confirmation2.
You said; you had edited it. Please advise again, which one you edited Blue or Red? Thank you.

<?php
// Receiving variables
@$Name = addslashes($_POST['Name']);
@$Street = addslashes($_POST['Street']);
@$City = addslashes($_POST['City']);
@$Province = addslashes($_POST['Province']);
@$PostCode = addslashes($_POST['Post Code']);
@$TelHP = addslashes($_POST['Tel HP']);
@$EMail = addslashes($_POST['E Mail']);
@$Message = addslashes($_POST['Message']);
// Validation
if (strlen($Name) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($Street) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($City) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($Province) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($TelHP) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($EMail) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($Message) == 0 )
{
header("Location: error2.htm");
exit;
}
//Sending Email to form owner
$pfw_header = "From: $EMail\n"
. "Reply-To: $EMail\n";
$pfw_subject = "Contact Us";
$pfw_email_to = "xxxx@xxx.kom (xxxx@xxx.kom)";
$pfw_message = "Name: $Name\n"
. "Street: $Street\n"
. "City: $City\n"
. "Province: $Province\n"
. "Post Code: $PostCode\n"
. "Tel HP: $TelHP\n"
. "Email: $EMail\n"
. "Message: $Message\n";
*****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
header("Location: confirmation2.htm");
?>

<?php
// Receiving variables
@$Name = addslashes($_POST['Name']);
@$Street = addslashes($_POST['Street']);
@$City = addslashes($_POST['City']);
@$Province = addslashes($_POST['Province']);
@$PostCode = addslashes($_POST['Post Code']);
@$TelHP = addslashes($_POST['Tel HP']);
@$EMail = addslashes($_POST['E Mail']);
@$Message = addslashes($_POST['Message']);
// Validation
if (strlen($Name) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($Street) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($City) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($Province) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($TelHP) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($EMail) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($Message) == 0 )
{
header("Location: error2.htm");
exit;
}
//Sending Email to form owner
$pfw_header = "From: $EMail\n"
. "Reply-To: $EMail\n";
$pfw_subject = "Contact Us";
$pfw_email_to = "xxxx@xxx.kom (xxxx@xxx.kom)";
$pfw_message = "Name: $Name\n"
. "Street: $Street\n"
. "City: $City\n"
. "Province: $Province\n"
. "Post Code: $PostCode
. "Tel HP: $TelHP\n"
. "Email: $EMail\n"
. "Message: $Message\n";
*****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
header("Location: confirmation2.htm");
?>

navaldesign
06-16-2007, 07:19 AM
The blue one is the correct one.

WSBlue
06-18-2007, 04:10 PM
The blue one is the correct one.
<?php
// Receiving variables
@$Name = addslashes($_POST['Name']);
@$Street = addslashes($_POST['Street']);
@$City = addslashes($_POST['City']);
@$Province = addslashes($_POST['Province']);
@$PostCode = addslashes($_POST['Post Code']);
@$TelHP = addslashes($_POST['Tel HP']);
@$EMail = addslashes($_POST['E Mail']);
@$Message = addslashes($_POST['Message']);
// Validation
if (strlen($Name) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($Street) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($City) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($Province) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($TelHP) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($EMail) == 0 )
{
header("Location: error2.htm");
exit;
}
if (strlen($Message) == 0 )
{
header("Location: error2.htm");
exit;
}
//Sending Email to form owner
$pfw_header = "From: $EMail\n"
. "Reply-To: $EMail\n";
$pfw_subject = "Contact Us";
$pfw_email_to = "xxxx@xxx.kom (xxxx@xxx.kom)";
$pfw_message = "Name: $Name\n"
. "Street: $Street\n"
. "City: $City\n"
. "Province: $Province\n"
. "Post Code: $PostCode\n"
. "Tel HP: $TelHP\n"
. "Email: $EMail\n"
. "Message: $Message\n";
*****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
header("Location: confirmation2.htm");
?>

Yes, I got it . Thank you Naval,
I finally can get it to confirmation page.
I redo the form and go over scipt.

I couldn't get the Blue one work.
Please check green text.
Receiving variables and Sending e mail to form owner.
TelHP (no space )and Tel HP (space).
Tel HP (space) and TelHP (no space).
Email and EMail
Because of these irregular scripts causes the problem?
Please advise.

navaldesign
06-18-2007, 05:44 PM
Don't confuse "Tel HP:" which is simply the text that you will recieve in the email, with the "$TelHP" which is the local variable assigned for the telephone, nor with the "($_POST['Tel HP']);" which is the post variable as recieved from the form. The script is correct, otherwise you would nor receive neither the email address or the telephone, and the script would go to the error page.