View Single Post
  #5  
Old 02-24-2006, 02:22 AM
secretalain secretalain is offline
Corporal
 
Join Date: Dec 2005
Posts: 16
Red face Re: Going Crazy for 3 days now

hello naveldesign thank you for youre reply's!
i have 7 error pages error_naam.html> error_adres.html> etc.
how must the other 4 fields be written in the script???
beacause the other 4 fields arent required, the code is different am i right ?? so what is that code ??

NAVELDESIGN:
And you haven't put the email "grabbing" in the beggining of the script

what do you mean ?
new script >>>

PHP

<?php
// Receiving variables
@$Naam = addslashes($_POST['Naam']);
@$Adres = addslashes($_POST['Adres']);
@$Postcode = addslashes($_POST['Postcode']);
@$Woonplaats = addslashes($_POST['Woonplaats']);
@$Geboortedatum = addslashes($_POST['Geboortedatum']);
@$Geboorteplaats = addslashes($_POST['Geboorteplaats']);
@$Telefoonnummer = addslashes($_POST['Telefoonnummer']);
// Validation
if (strlen($Naam) == 0 )
{
header("Location: error_naam.html");
exit;
}
if (strlen($Adres) == 0 )
{
header("Location: error_adres.html");
exit;
}
if (strlen($Postcode) == 0 )
{
header("Location: error_postcode.html");
exit;
}
if (strlen($Woonplaats) == 0 )
{
header("Location: error_woonplaats.html");
exit;
}
if (strlen($Geboortedatum) == 0 )
{
header("Location: error_geboortedatum.html");
exit;
}
if (strlen($Geboorteplaats) == 0 )
{
header("Location: error_geboorteplaats.html");
exit;
}
if (strlen($Telefoonnummer) == 0 )
{
header("Location: error_telefoonnummer.html");
exit;
}
//Sending Email to form owner
$pfw_header = "From: $Email\n"
. "Reply-To: $Email\n";
$pfw_subject = "aanmelden";
$pfw_email_to = "info@rijschool.nl";
$pfw_message =
. "Naam: $Naam\n"
. "Adres: $Adres\n"
. "Postcode: $Postcode\n"
. "Woonplaats: $Woonplaats\n"
. "Geboortedatum: $Geboortedatum\n"
. "Geboorteplaats: $Geboorteplaats\n"
. "Telefoonnummer: $Telefoonnummer\n";
*****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
header("Location: bevestiging.html");
?>

is this better ?where must i correct things?
for me its verry diffecult because the translation, so i hope you won't mind helping me.
Reply With Quote