Try with the simplest form to get a hand how to do it first.
I made the following pages:
-The main page with the form:
-A Confirmation page:
-An error page:
Then I downloaded the php zipfile from tutorial
Why? Because it's already a php file, I just have to delete the content and replace by this script:
<?php
// Receiving variables from the form
@$Name = addslashes($_POST['Name']);
if (strlen($Name) >40)
{
header("Location: error.html");
exit;
}
if (strlen($Name) == 0 )
{
header("Location: error.html");
exit;
}
//Sending Email to form owner
$pfw_header = "From: $email\n"
. "Reply-To: $email\n";
$pfw_subject = "testing";
$pfw_email_to = "your_Bluevoda_email_address";
$pfw_message = "Name: $Name\n";
*****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
header("Location: confirmation.html");
?>
This is a script from Navaldesign that I have altered. Thank you Navaldesign :)
I saved it as test.php and uploaded it to the server using BlueFTP. That's it !
Please feel free to test it at:
With or without putting a name on it
So the whole idea is there are 3 .html pages and 1 .php page.
The php page serves like a "navigator" to direct the form to confirmation or error.
If there are more required fileds, you need more error pages and the script must include new data.
At first glance, the script code could be intimiding but if you try to understand the meaning, it's not too tough to get it. Then you can alter it for your needs.
I am not a tech guy, at all, because my field is health care but I guess everybody can use their common sense to figure it out without much difficulties. So don't be afraid :) Go for it.
Hope this will help
Good luck to all
Quyhurry
I made the following pages:
-The main page with the form:
-A Confirmation page:
-An error page:
Then I downloaded the php zipfile from tutorial
Why? Because it's already a php file, I just have to delete the content and replace by this script:
<?php
// Receiving variables from the form
@$Name = addslashes($_POST['Name']);
if (strlen($Name) >40)
{
header("Location: error.html");
exit;
}
if (strlen($Name) == 0 )
{
header("Location: error.html");
exit;
}
//Sending Email to form owner
$pfw_header = "From: $email\n"
. "Reply-To: $email\n";
$pfw_subject = "testing";
$pfw_email_to = "your_Bluevoda_email_address";
$pfw_message = "Name: $Name\n";
*****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
header("Location: confirmation.html");
?>
This is a script from Navaldesign that I have altered. Thank you Navaldesign :)
I saved it as test.php and uploaded it to the server using BlueFTP. That's it !
Please feel free to test it at:
With or without putting a name on it
So the whole idea is there are 3 .html pages and 1 .php page.
The php page serves like a "navigator" to direct the form to confirmation or error.
If there are more required fileds, you need more error pages and the script must include new data.
At first glance, the script code could be intimiding but if you try to understand the meaning, it's not too tough to get it. Then you can alter it for your needs.
I am not a tech guy, at all, because my field is health care but I guess everybody can use their common sense to figure it out without much difficulties. So don't be afraid :) Go for it.
Hope this will help
Good luck to all
Quyhurry
Comment