i just passed from my xampp server to bluehost hosting service. and im having problems...
So here is the story, before i bought my hosting plan they told me that any php code within a .html would be executed (just like on my xampp server). well it doesn't work... i asked them for help and they told me i had to change the file to .php and that i didn't need to change any of the code inside. so i did, and it doesn't work... im geting:
Cannot modify header information - headers already sent by (output started at /home7/.../public_html/index.php:10) in /home7/.../public_html/index.php on line 28
i have done some research for the past 7 straight hours and cant get it to work.
here is the code:
<html>
<head>
<?phpsession_start();
//check if logged in
function isLoggedIn()
{
if(isset($_SESSION['valid']) && $_SESSION['valid'])
return true;
return false;
}
//if the user has not logged in
if(!isLoggedIn())
{
header('Location: login_form.html');
}
/*-----Connect to Database-----*/
include ('connect_database_2.php');
/* get username */
$username = $_SESSION['username'];
/*-----Include Navigation------*/
include ('frame.html');
?>
<LINK href="stylesheets/blog_index_stylesheet.css" rel="stylesheet" type="text/css">
<title>Blog Photos</title>
i tried putting <?phpsession_start();
at the very start but i get a server 500 error or something like that, i told that to the host and they told me it was a scripting error.