Hallo,
bis gerade eben hat noch alles funktioniert und jetzt geht nix mehr.
Es kommt folgender Fehler:
Warning: Cannot add header information - headers already sent by (output started at /usr/local/httpd/htdocs/phpMyInventory/includes/user_func.inc.php:68) in /usr/local/httpd/htdocs/phpMyInventory/move_abteilung.php on line 21
user_func: Zeile 68 ist die mit <?
Hier die MoveAbteilung:
bis gerade eben hat noch alles funktioniert und jetzt geht nix mehr.
Es kommt folgender Fehler:
Warning: Cannot add header information - headers already sent by (output started at /usr/local/httpd/htdocs/phpMyInventory/includes/user_func.inc.php:68) in /usr/local/httpd/htdocs/phpMyInventory/move_abteilung.php on line 21
user_func: Zeile 68 ist die mit <?
PHP-Code:
<?
Function buildAbteilungSelect($intAbteilung, $showSpare) {
# $strSQL = "SELECT count(*) FROM Abteilung";
# $result = dbquery($strSQL);
# $row = mysql_fetch_row($result);
# $numAbteilung = $row[0];
# mysql_free_result($result);
# If ($numAbteilung > 70) {
# } Else {
$strSQL = "SELECT name, id_abteilung FROM Abteilung";
$result = dbquery($strSQL);
$strReturnString = "<select name='cboAbteilung' size='1'>\n";
$strReturnString .= "<option value=''> </option>\n";
if ($showSpare) {
$strReturnString .= "<option value='spare'>** Make Spare Part **</option>\n";
}
while ($row = mysql_fetch_array($result)) {
$strReturnString .= "<option value='".$row['id_abteilung']."' ".writeSelected($row['id_abteilung'], $intAbteilung).">";
$strReturnString .= "$row[name] ";
$strReturnString .= "</option>\n";
}
$strReturnString .= "</select>\n";
# }
Return $strReturnString;
}
?>
PHP-Code:
<?
$intSecurity = 1;
$intTimeOut = 1800;
include "includes/security.inc.php";
include "includes/db.inc.php";
include "includes/functions.inc.php";
include "includes/user_func.inc.php";
// Has the form been submitted
if ($REQUEST_METHOD == 'POST') {
if ($hardware_id) {
if ($cboAbteilung != "spare") {
if (!$cboAbteilung) {
$strError = "Please select a department.";
} else {
$strSQL = "UPDATE hardware SET abteilung_fk=$cboAbteilung, sparePart=0 WHERE pk_asset=$hardware_id";
$result = dbquery($strSQL);
header("Location: ./index.php?notify=update"); <--------------------------------------------- Zeile 21
}
} else {
$strSQL = "UPDATE hardware SET abteilung_fk=0, sparePart=1 WHERE pk_asset=$hardware_id";
$result = dbquery($strSQL);
header("Location: ./index.php?notify=update");
}
} else {
$strError = "Unexpected error: please return to the <a href='index.php'>home page</a>, and retry this operation.";
}
}
include "includes/header.inc.php";
declareError(TRUE);
?>
<FORM METHOD="post" ACTION="<? echo $PHP_SELF?>">
<INPUT TYPE="hidden" NAME="hardware_id" VALUE="<? echo $hardware_id; ?>">
Assign to this department: <? echo buildAbteilungSelect($cboAbteilung, TRUE); ?>
<p>
<font size='-1'>
<INPUT TYPE="submit" NAME="submit" VALUE="Submit Change"> <A HREF="index.php">Never Mind</A></font>
</FORM>
<?
include "includes/footer.inc.php";
?>
Kommentar