I'm new to php and I've been battling all day trying to find a solution to this error on my remote server, it works fine locally on my computer
Warning: Cannot modify header information - headers already sent by (output started at /home3/ezzuah/public_html/onecedishop.com/page.php:3) in /home3/folder_path/page.php on line 62
php
<?php require_once('Connections/conn.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}
$colname_rs_users = "-1";
if (isset($_SESSION['MM_Username'])) {
  $colname_rs_users = $_SESSION['MM_Username'];
}
mysql_select_db($database_conn, $conn);
$query_rs_users = sprintf("SELECT * FROM regis WHERE username = %s", GetSQLValueString($colname_rs_users, "text"));
$rs_users = mysql_query($query_rs_users, $conn) or die(mysql_error());
$row_rs_users = mysql_fetch_assoc($rs_users);
$totalRows_rs_users = mysql_num_rows($rs_users);
?>
<?php
// Create connection
$conn= new mysqli($hostname_conn, $username_conn, $password_conn,$database_conn);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}
$user=$row_rs_users['username'];
$sql = "UPDATE regis SET credit_unit = credit_unit - 1  WHERE username='$user'";
if ($conn->query($sql) === TRUE) { 
} else {
    echo "Error updating record: " . $conn->error;
}
header("Location:bid_ok_m.php"); 
$conn->close();
?> 
<?php
mysql_free_result($rs_users);
?>
When i preview my page i get this error i read on the web and i was told there shouldn't be any spaces before the start and end of the script which i did but still getting the error
 
     
    