Warning: Cannot modify header information - headers already sent by (output started at C:\xampplite\htdocs\TestLab\Z-Matic calculator Layout\index.php:19) in C:\xampplite\htdocs\TestLab\Z-Matic calculator Layout\index.php on line 31
PHP:
<?php session_start();
include('connection.php');
//Definieer variabelen
$name=$_POST['name'];
$company=$_POST['company'];
$email=$_POST['email'];
$lang=$_POST['lang'];
if(isset($_POST['submit']))
{
if(!$email == "" && (!strstr($email,"@") || !strstr($email,".")))
{
echo "<b>Please provide a valid E-mail adress. Return to the form with your browsers \"back\" button.</b>\n";
}
if(empty($name) || empty($company))
{
echo "<b>Please provide us with your company name. Return to the form with your browsers \"back\" button.</b>\n";
}
if(empty($lang))
{
echo "<b>To continue to the form, we need to know what language we should load for you, please provide it. Return to the form with your browsers \"back\" button.</b>\n";
}
$sql="INSERT INTO klant (name,company,email,lang) VALUES('$name','$company','$email','$lang')";
$query=mysql_query($sql) or die ("Kon de query niet uitvoeren");
$_SESSION['semail'] = $email;
$_SESSION['slang'] = $lang;
header ("Location: $lang/page1.php");
}
else
{
?>