note 108392 rejected from function.header by salathe

From: Date: Mon, 23 Apr 2012 13:12:01 +0000
Subject: note 108392 rejected from function.header by salathe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-187297@lists.php.net to get a copy of this message
Note Submitter: sakil1001 at yahoo dot com ---- <?php include('connection.php'); $str=$_POST['txtFname']; $query=mysql_query("select * from user where fName='$str'"); $count=0; if(!($_POST['btnSubmit'] && $_POST['txtFname'])){ echo"Enter Name of the user."; header('Location: index.php'); exit; } else{ echo"<ol>"; while($rows=mysql_fetch_assoc($query)): $fName=$rows['fName']; $lName=$rows['lName']; $age=$rows['age']; echo"<li> ".$fName." ".$lName." is ".$age." years old.<br>"; $count++; endwhile; print"</ol>"; if($count){ echo"we have ".$count." ".$_POST['txtFname']; echo"<br />"; for($i=strlen($str)-1;$i>=0;$i--) echo $str[$i];} else echo " data not match."; header('Location: index.php'); } ?> ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, The above is my action.php page. But i cant redirect to index.php.

« previous php.notes (#187297) next »