I have code for validation of user:
[code=php]
<?php
//search for name
/* Connect to MySQL-Server */
…
/* Open $db */
…
$un = $_POST[‘usernameop’];
if (isset($_POST[‘fnameop’]))
{
$query = “SELECT * FROM users WHERE user=’$un’ LIMIT 1”;
$result = mysql_query($query) or die (“SQL error: $query — ” . mysql_error());
while ($row = mysql_fetch_array($result))
{
$validation_search = TRUE;
}
}
?>
I have this code included in my primary page. But it gives me anwser:
Warning: Cannot modify header information – headers already sent by (output started at validation_search.php:11) in index.php on line 50
I have all the time problem with this, what is here output that causes error?
In index there is:
[code=php]
include (“validation_search.php”);
if ($validation_search == TRUE)
{ header(‘Location: home.php’);}