I'm very new to PHP and i'm getting the following error:
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/tunethe1/public_html/viewforme.com/step1.php:8) in /home/tunethe1/public_html/viewforme.com/step1.php on line 28
I read a few things on this but none of it made much sense to me and I'm wondering whether someone could help clear it up.
This is how my code looks:
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="style.css" rel="stylesheet" type="text/css" />
<title>ViewForMe</title>
<script type="text/JavaScript">
// If the length of the element's string is 0 then display helper message
function checkform(){
var urls = document.getElementById('urls');
if(urls.value.length == 0){
alert("Please submit a URL to continue.");
urls.focus(); // set the focus to this input
return false;
}
<?php $step1="1" ?>
return true;
}
</script>
</head>
<body>
<?php session_start(); ?>