How can i open an authentication dialog box. I used the following code:
<?php
header('WWW-Authenticate: Basic realm=Private') ;
header('HTTP/1.0 401 Unauthorized');
exit;
?>
This keeps giving an error message like:
Warning: Cannot modify header information - headers already sent by (output
started at /var/www/html/inlog1/form.php:2) in /var/www/html/inlog1/form.php
on line 4
Warning: Cannot modify header information - headers already sent by (output
started at /var/www/html/inlog1/form.php:2) in /var/www/html/inlog1/form.php
on line 5
What am i doing wrong
roy
netherlands
<?php
header('WWW-Authenticate: Basic realm=Private') ;
header('HTTP/1.0 401 Unauthorized');
exit;
?>
This keeps giving an error message like:
Warning: Cannot modify header information - headers already sent by (output
started at /var/www/html/inlog1/form.php:2) in /var/www/html/inlog1/form.php
on line 4
Warning: Cannot modify header information - headers already sent by (output
started at /var/www/html/inlog1/form.php:2) in /var/www/html/inlog1/form.php
on line 5
What am i doing wrong
roy
netherlands
Comment