0
<?php
session_start();
if(!isset($_SESSION['userid']))
{
print '<script type="text/javascript">';
print 'alert("Login to submit resume.")';
print '</script>'; 
header('location:login.html');
}?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

i try every thing still im getting the same problem

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/royal/public_html/submitresume.php:1) in /home/royal/public_html/submitresume.php on line 2

Warning: Cannot modify header information - headers already sent by (output started at /home/royal/public_html/submitresume.php:1) in /home/royal/public_html/submitresume.php on line 8

Every thing working fine on localhost

4
Contributors
11
Replies
12
Views
5 Years
Discussion Span
Last Post by Szabi Zsoldos
0

Make sure you don't sent anything on browser before you use session_start.
Is there any blank space before code start?

0

Firstly Thanks for quick reply
@Vibhaj There is no blank space, i post my code from first line of my page
@priaeas how to find non-visible utf8 byte order mark if is there
Im using macromedia dreamweaver8 as a text editor

0

Try it with a different text-editor, that can enable/disable the mark, or try saving it in Notepad for example.

0

@pritaeas I try find by using notepad to but did't get any sucess
any more help abt this ..........thanks in advance

0

Oh wait, overlooked the fact that on line 8 you are trying to redirect, after printing info on the screen. That is not possible. If you really need the alert, do the redirect using javascript, instead of using php's header function.

0

Actually I insert alert after getting that error that means I tryed by removing that also

0

Perhaps the warnings are not shown on your local server. Have you tried saving the file in a different texteditor yet?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.