Here is my code:
$id = $_GET['id'];
$data = $_POST['name'];
$data1 = $_POST['id'];
$c = 0;
foreach ($data1 as $key => $value) {
$sql = "UPDATE ".$table_comp." SET score = " . $data[$c][$value] . " where id = " . $value .";" ;
mysqli_query($connect,$sql);
$c++;
}
header('Location: http://www.csscorecard.com/admin/?id=$id');
I have problem in my redirect there is an error:
Warning: Cannot modify header information - headers already sent by (output started at /home/csscorecard/public_html/wp-content/themes/twentyseventeen/ajax/submit.php:3) in /home/csscorecard/public_html/wp-content/themes/twentyseventeen/ajax/submit.php on line 54