+ 1

Can anybody help me to figure out the error on the coding? It says the session had been already started on line 2.

<?php session_start(); //line 2 ?> <!DOCTYPE> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Hostel Management System</title> <link href="templatemo_style.css" rel="stylesheet" type="text/css" /> <script language="javascript" type="text/javascript"> it keeps saying that function clearText(field) {     if (field.defaultValue == field.value) field.value = '';     else if (field.value == '') field.value = field.defaultValue; } </script>

31st Dec 2017, 5:31 AM
Vasanth Kumar
Vasanth Kumar - avatar
1 ответ
+ 9
Headers have already been sent from the server (either to your mobile or the batch output collector): Warning: session_start(): Cannot send session cookie - headers already sent by (output started at ..\Playground\:1) in ... You aren't in control of this here; I've had to find alternate solutions that don't require such early behavior.
31st Dec 2017, 6:03 AM
Kirk Schafer
Kirk Schafer - avatar