hej derude
jeg er ny har på siden, så jeg håber det er den rigtige tråd jeg
er i.
mit problem er at jeg ikke får hele formularen med på email.
kan ikke selv finde problemet selv.siden ser sådan du:
<?php
/*
This first bit sets the email address that you want the form to
be submitted to.
You will need to change this value to a valid email address that
you can access.
*/
$webmaster_email = "din@email.dk";
/*
This bit sets the URLs of the supporting pages.
If you change the names of any of the pages, you will need to
change the values here.
*/
$feedback_page = "feedback_form.html";
$error_page = "error_message.html";
$thankyou_page = "thank_you.html";
/*
This next bit loads the form field data into variables.
If you add a form field, you will need to add it here.
*/
$email = $_REQUEST['email'] ;
$Referencer = $_REQUEST['Referencer'] ;
$Fornavn = $_REQUEST['Fornavn'] ;
$Efternavn = $_REQUEST['Efternavn'] ;
$Adresse = $_REQUEST['Adresse'] ;
$Post_nr = $_REQUEST['Post_nr'] ;
$by = $_REQUEST['by'] ;
$Mobil_nr = $_REQUEST['Mobil_nr'] ;
$Har_du_sundhedsuddannelse =
$_REQUEST['Har_du_sundhedsuddannelse'] ;
$job = $_REQUEST['job'] ;
$vagter = $_REQUEST['vagter'] ;
$Transport = $_REQUEST['Transport'] ;
/*
The following function checks for email injection.
Specifically, it checks for carriage returns - typically used by
spammers to inject a CC list.
*/
function isInjected($str) {
$injections = array('(\n+)',
'(\r+)',
'(\t+)',
'(%0A+)',
'(%0D+)',
'(%08+)',
'(%09+)'
);
$inject = join('|', $injections);
$inject = "/$inject/i";
if(preg_match($inject,$str)) {
return true;
}
else {
return false;
}
}
// If the user tries to access this script directly, redirect
them to the feedback form,
if (!isset($_REQUEST['email'])) {
header( "Location: $feedback_page" );
}
// If the form fields are empty, redirect to the error page.
elseif (empty($email) || empty($Har_du_sundhedsuddannelse)) {
header( "Location: $error_page" );
}
// If email injection is detected, redirect to the error page.
elseif ( isInjected($email) ) {
header( "Location: $error_page" );
}
// If we passed all previous tests, send the email then redirect
to the thank you page.
else {
mail( "$webmaster_email", "Feedback Form Results",
$Transport, "From: $email" );
header( "Location: $thankyou_page" );
}
?>
MVH
Dennis
--
Vil du lære at kode HTML, XHTML, CSS, SSI, ASP eller ASP.NET?
- Pædagogiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! =>
http://www.html.dk/tutorials