I thought I did this before and it worked? However gives error:
Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\xampp\htdocs\update.php:5) in C:\Program Files\xampp\htdocs\update.php on line 37
Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\xampp\htdocs\update.php:5) in C:\Program Files\xampp\htdocs\update.php on line 38
Code removed is only putting/getting variables data
Wanting this page to return to index.php (root/localhost at moment) Thanks
<?
session_start()
?>
<?
$username="";
$password="";
$database="";
mysql_connect(localhost,$username);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM template";
$result=mysql_query($query);
$num=mysql_numrows($result);
$i=0;
while ($i < $num) {
// Bits in here
$i++;
}
mysql_close();
header("Location:../index.php");
header("Connection: close");
?>
Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\xampp\htdocs\update.php:5) in C:\Program Files\xampp\htdocs\update.php on line 37
Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\xampp\htdocs\update.php:5) in C:\Program Files\xampp\htdocs\update.php on line 38
Code removed is only putting/getting variables data
Wanting this page to return to index.php (root/localhost at moment) Thanks
<?
session_start()
?>
<?
$username="";
$password="";
$database="";
mysql_connect(localhost,$username);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM template";
$result=mysql_query($query);
$num=mysql_numrows($result);
$i=0;
while ($i < $num) {
// Bits in here
$i++;
}
mysql_close();
header("Location:../index.php");
header("Connection: close");
?>