RE: [PHP] redirection again.... sorry

From: Date: Thu, 13 Jul 2000 19:19:54 +0000
Subject: RE: [PHP] redirection again.... sorry
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-6604@lists.php.net to get a copy of this message
Check for whitespace before the <?, and in any files that are included before this file. there can be absolutely NO output before the header() command... that means no whitespace, no echo() or print() statements, nothing. Also make sure CheckLogin() doesn't output anything and make sure your config.php file doesn't have any extra whitespace before the <? or after the ?> John -----Original Message----- From: Subhrajyoti Moitra [mailto:subhra@iitk.ac.in] Sent: Friday, July 14, 2000 3:10 AM To: php-general@lists.php.net Subject: [PHP] redirection again.... sorry hi list, i am having a redirection problem again.... heres the code.... <? session_start(); global $uid,$ID,$row,$passwd,$linkid; require("config.php"); if($ID==""){ //check login and show his profile if(CheckLogin($uid,$passwd)==0){ $ID=session_id(); if(log_user()==1){ switch($linkid){ case 1: header("location:../search/searchform.html"); break; case 2:break; case 3: header("location: news.html"); break; case 4: header("location: index.html"); break; case 5: header("location: world.html"); break; case 6: header("location: help.html"); break; case 7: displayUserPage($ID); break; case 8: header("location:coffeehouse.html"); break; default: echo "Something wrong<br>"; } //echo "success...<br>"; } else{ echo "<br> not logged .. contact system admin"; } } else { displayErrorPage(); } } else{ displayUserPage($ID); } ?> below is the config.php file.. <? $dbhost="localhost"; $dbname="New"; $dbuser="subhra"; $dbpasswd="asdfg"; $dbtable="NewData"; $dbauthusertable="AUTH_USER"; $dbmaster="NewMyData"; $dblog="AUTH_USER" ?> i am not echoing anything in Checklogin() or in log_user() the warning is in line 12. Warning: Cannot add header information - headers already sent by (output started at config.php:12) in /home/subhra/public_html/php/auth/show_profile.php on line 12 please i am stuck ... someone suggested to change META-EQUIV or something .. i am not sure ... please advice... thanx in advance.. subhro -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#6604) next »