Hi, I am trying to help a friend whose PHP programmer went AWOL. Only I know very little about PHP myself. He has, on the backend of his site, a piece of functionality that allows a user to upload a filewhich will be linked to from the home page of the website. The code I want to implement is as follows:
This link passes information on to a file called modules/class_news.php, which has several scenarios set up. The eigth scenario, which I’ve created, is as follows:
case 8:
# Erase news
// el archivo viejo lo borramos
mysql_connect($dbhost,$usuario,$clave);
// erase the registry
mysql_db_query($dbname,"update db_news set `file` = '' where id = $id ");
mysql_db_query($dbname,$sql);
$url = "../news.php?acc=8";
Header("Location: $url");
break;
The error I am getting is as follows:
Warning: Cannot modify header information - headers already sent by (output started at /home/virtual/site48/fst/var/www/html/controlpanel/modules/class_news.php:130) in /home/virtual/site48/fst/var/www/html/controlpanel/modules/class_news.php on line 150
Anybody know an easy way to do this? Thanks!