I'm trying to do an update to a mysql record.
but seem to be getting some errors,
$update = $_REQUEST['update'];
$content = $_REQUEST['content'];
$section = $_REQUEST['section'];
mysql_connect($DBhost,$DBuser,$DBpass) or die("Unable to connect to database");
@mysql_select_db("$DBName") or die("Unable to select database $DBName");
$sqlquery = "UPDATE content SET cData='$content' WHERE id='$update'";
Notice: Undefined variable: query in C:\Program Files\Apache Group\Apache2\htdocs\national\admin\func.php on line 14
line 14 is: mysql_query($query);
Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\Apache Group\Apache2\htdocs\national\admin\func.php:14) in C:\Program Files\Apache Group\Apache2\htdocs\national\admin\func.php on line 16
line 16: header("Location: admin.php?edit=$section");
why am i getting this header error? this is the only code in the script right now, so i'm a bit confused. also why is my update statement not working?
I thought it would be the same as the INSERT statement, cept use UPDATE insted??
thanks in advance for your time!