|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-09-17 01:22 UTC] sniper@php.net
[2003-09-24 22:24 UTC] alex dot baron at tusk dot com dot au
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 22:00:01 2025 UTC |
Description: ------------ Hi bug fixing type people, I have a php form posting to a php file that then places the data into mysql. the issue happens when the page is redirected to the homepage the error is CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: if you hit the refresh the page loads. Iam running XP no SP's and have the latest stable relese of PHP on my machine downloaded from snap.php.net and the iis is 5.1 mysql is version 4.0.13-nt also i installed the .net frame work but have uninstalled it since. code that previously work seem to no longer function producing the same error. thanks for your time Alex Reproduce code: --------------- this is the code iam still learning : <? include "../includes/dbconnect.php"; // this is processed when the form is submitted // back on to this page (POST METHOD) if (!is_null($key = key($_POST))) { // double-up apostrophes $description = addslashes($_POST['description']); $subject = addslashes($_POST['subject']); $date = addslashes($_POST['date']); $date = split("-",$date); $date = "$date[2]-$date[1]-$date[0]"; // setup SQL statement $SQL = "INSERT INTO tblnews (description, subject, date) VALUES ('$description','$subject','$date')"; // execute SQL statement $result = mysql_db_query($db,$SQL,$cid); // check for error if (is_null($result)) { echo "ERROR: " . mysql_error() . "\n$SQL\n"; }else{ header("Location: newslisting.php"); exit; } } ?> Expected result: ---------------- submit it to the database and return to the listings page