hi
I 'm newbie with php and i have a small problem.
I have a script that uploads 4 pictures
But when that is done there has to be a redirect to an other page.
My script is as follows:
<?php
header("Location: http://www.xxxxx.com/x.html");
$num=$nummer;
if(count($FILE) == 0 || $FILE[1] == none)
{
#print("File(s) not uploaded.");
}else{
#print("<span class=\"tekst\">");
# Loop through the uploaded files
foreach($FILE as $key => $value)
{
if($value != none)
{
if($saveto == "disk")
{
$mtest = $test;
$destpath = sprintf("/home/users/A000456/x.be/upload/%s%s",$num,$FILE_name[$key]);
copy($value,$destpath);
$conn = mysql_connect("213.239.56.153:3306","U045601D","kvch97");
#echo "Fout : ".mysql_errno()." : ".mysql_error()."<BR>";
mysql_select_db("D045601D",$conn);
#echo "Fout : ".mysql_errno()." : ".mysql_error()."<BR>";
$msql = sprintf("insert into upload (filename, filesize, contenttype, indexnr,
nummer)
values('%s%s','%s','%s','%s','%s')",$num,$FILE_name[$key],$FILE_size[$key],$FILE_type[$key],$num,$test);
#printf("%s<br>",$msql);
$rs = mysql_query($msql,$conn);
#echo "Fout : ".mysql_errno()." : ".mysql_error()."<BR>";
$num=$num+1;
}
}
}
#print("</span>");
mysql_close($conn);
}
?>
but i keep getting the folowing error:
Warning: Cannot add header information - headers already sent by (output started at
/home/users/A000456/x.be/upload.php:1) in /home/users/A000456/x.be/upload.php on line 2
Etienne Colla