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");
?>
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");
?>
Comment