I have a form that posts back to itself.
<form name="frmEdit" method="post" action="Edit.php?action=submit">
When the user hits submit the page is refreshed and this code works:
<?
$conn = odbc_connect($database, $username, $password);
if (isset($GET['action']))
{
if ($GET['action']=="submit")
{
$sOptionValue =$POST["txtValue"];
$sOptionStatus=$POST["chkStatus"];
$iOptionID = $_GET['ID'];
$rs=odbc_exec($conn,"EXEC update_Affiliation ".$iOptionID.",".$sOptionValue.",".$sOptionStatus);
}
}
?>
Now that the data has been saved to the database I want to redirect the user to another form. I have tried using
header() but keep getting an error :
Warning: Cannot add header information - headers already sent by (output started at ...