min bestilling form spiller ikke rigtigt
Jeg har netop lagt en datepicker ind på min bestillingsform, og kan ikke rigtigt få formen til at spille.Jeg han ikke få værdierne lagt ind i Databasen, og dels ikke redirekte til min application. jeg modtager dog en mail med informationer, så noget virker.
min form ligger her http://www.italien-ferie.dk/booking.php
min connect.php fil ser sådan ud:
<?php
$username = "italienferie";
$dbname = "xxxxxx";
$password = "xxxx";
$hostname = "localhost:3306"; //Plejer at være localhost
$dbh = mysql_connect($hostname, $username, $password)or die("Unable to connect to MySQL");
mysql_select_db($dbname, $dbh) or die("Unable to select DB");
?>
min redirect.php er sådan:
<?php
ini_set("SMTP","smtp.italien-ferie.dk");
$modtager = "hans@italien-ferie.dk>";
$emne = "Booking af hus";
$indhold = "Der er en forespørgsel på huset";
foreach($_POST AS $key => $value)
{
$indhold .= $key . " = " . $value . "\n";
}
mail($modtager,$emne,$indhold);
require("connect.php");
if(isset($_POST['submit'])){
$name = $_REQUEST["name"];
$streetno = $_REQUEST["streetno"];
$zip = $_REQUEST["zip"];
$city = $_REQUEST["city"];
$country = $_REQUEST["country"];
$telephone = $_REQUEST["telephone"];
$mail = $_REQUEST["mail"];
$weeks = $_REQUEST["weeks"];
$nopeople = $_REQUEST["nopeople"];
$noadults = $_REQUEST["noadults"];
$nochildren = $_REQUEST["nochildren"];
$start = $_REQUEST["start"];
$slut = $_REQUEST["slut"];
$remarks = $_REQUEST["remarks"];
mysql_query("insert into min_tabel(kundeID, name, streetno, zip, city, country, telephone, mail, weeks, nopeople, noadults, nochildren, start, slut, remarks)values(0, '$name', '$streetno','$zip','$city','$country','$telephone','$mail','$weeks','$nopeople','$noadults','$nochildren','$start','$slut','$remarks')")or die(mysql_error());
header("Location: application.php");
}
?>
Er her nogen der kan hjælpe
