Header Problem...

From: Date: Mon, 26 Mar 2001 15:06:11 +0000
Subject: Header Problem...
Groups: php.general 
Request: Send a blank email to php-general+get-45615@lists.php.net to get a copy of this message
Hi all, could any one tell me that how do I go to a specific URL using php command.At the same time, I would like to pass the variable to the page. I used header to do it but failed, with the error message:- Warning: Cannot add header information - headers already sent by (output started at /usr/local/apache/htdocs/traName_use.php:2) in /usr/local/apache/htdocs/traName_use.php on line 3 Warning: Cannot add header information - headers already sent by (output started at /usr/local/apache/htdocs/traName_use.php:2) in /usr/local/apache/htdocs/traName_use.php on line 4 Warning: Cannot add header information - headers already sent by (output started at /usr/local/apache/htdocs/traName_use.php:2) in /usr/local/apache/htdocs/traName_use.php on line 26 And our code is as below:- <?php header("Pragma : no-cache "); header("Cache-Control :no-cache,must-revalidate"); $db=mysql_connect("localhost","root","123456"); mysql_select_db("test",$db); $query="select trade_name_c
       from confirm_member_info
where trade_name_c = '$tradeName'"; $result=mysql_query($query,$db); $row=mysql_fetch_row($result); if($row[0]==$tradeName) { //echo "Sorry, the Trade Name <b>$tradeName</b> has been used<Br>"; //echo "Please Choose other Trade Name<BR>"; //echo "Click <a href='mysignup_1.php'here</a> to back."; header("Location: http://192.168.0.1/mysignup_1.php"); } else { //echo "Your Trade Name and password has been acceptted<br>"; //echo "Click to proceed."; //<input type='hidden' name='introducer' value='$introducer'> header("Location: http://www.hotmail.com"); } ?> <input type="hidden" name="tradeName" value="<?$tradeName?>"> <input type="hidden" name="password" value="<?$password?>"> <input type="hidden" name="MotherName" value="<?$MotherName?>"> I tried to use hidden input type to pass the value, but can it work without form and submit button?? I would appreaciate if you could give me suggestions and advice. thanks _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

« previous php.general (#45615) next »