Im missing something in this code I keep getting an error for the header
Warning: Cannot modify header information - headers already sent by (output started at C:\Domains\sousaink.com\wwwroot\pennyspder\config.php:7) in C:\Domains\sousaink.com\wwwroot\pennyspder\guestbook.php on line 22
here is my code
<?php
include("config.php");
include("opendb.php");
//Pull variables from form
$name = $_POST['name'];
$subject = $_POST['subject'];
$email = $_POST['email'];
$website = $_POST['website'];
$comments = $_POST['comments'];
$submit = $_POST['submit'];
//Check to see if form is submitted
if(isset($_POST['submit'])) {
//put info into database
$queryinsert = "INSERT INTO psguestbook (gbname, gbsubject, gbemail, gburl, gbcomments, date_posted) VALUES ('$name','$subject','$email','$website','$comments',NOW())";
mysql_query($queryinsert);
//redirect them to the guestbook viewing page
header("location:http://pennyspder.sousaink.com/guestbookview.php");
exit();
}
?>
Maybe because its late but I for the life of can't figure it out... and Ive done much more advanced stuff then this before...... :bemused: