Re: Problem Directing the Page with header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2007. 02. 15, csütörtök keltezéssel 18.41-kor Ashish Rizal ezt írta:
> Hey Jim,
> Thanks for the quick response. I have actually made the whole
> code on same page (login.php) and the functions that i used in
> this code are in functions.php. Now this time it is showing the
> warning :
> Warning: Cannot modify header information - headers already sent
> by (output started at C:\Program
> Files\xampp\htdocs\fselection\login.php:1) in C:\Program
> Files\xampp\htdocs\fselection\login.php on line 19 
> The line 19 is header("Location: http://$host$uri/$extra";);

it says you sent out some output on line 1
what is on line 1? maybe you have a blank line in the beginning of your
php file?

greets
Zoltán Németh

> 
>  Below is the list of code for login.php.
> The Server i am using is SunOS 5.10. 
> 
> <?php
> session_start();
> require_once 'functions.php';
> $UserName = $_POST['UserName'];
> $Password = $_POST['Password'];
> $host = $_SERVER['HTTP_HOST'];
> $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
> $extra = 'adminlogin.php';
> $loc = "\"http://$host$uri/$extra\"";;
> if ($_POST){
> $error = login_check($_POST);
> if (trim ($error)=="")
> {
> $accesslevel = accessLevel($UserName);
> ?>
> <?php
> if ($accesslevel == "admin"){
> $_SESSION["userid"] = login($_POST);
> header("Location: http://$host$uri/$extra";);
> exit();
> }
> else if ($accesslevel == "user") {
> //echo "this is user"; 
> $_SESSION["userid"] = login($_POST);
> header('Location: userlogin.php');
> exit();
> }
> }
> else {
> print "Error :$error";
> }
> }
> ?>
> <BODY>
> <FORM id=form1 name=loginform  method=post>
> <TABLE align=center> ........ 
> ***********************Login Form Goes Here **********
> nothing php Stuffs on this part
> </body>
> 
> Thank you again for your time and consideration. 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux