I Like to call the page using header(), but the following error occurs,
Cannot modify header information - headers already sent
why?. How to sort it out. Help me. My code is attached
if ( $_SERVER['REQUEST_METHOD'] == 'POST' )
{
$adduser=new Users();
if($adduser->checkmob()==true)
{
$adduser->addDB();
$adduser->addCarrer();
$adduser->addCricket();
$adduser->addHealth();
$adduser->addJokes();
$adduser->addThoughts();
?>
<script>alert ("Congratulations, You are now member of alertme serives");
</script>
<? header('Location: index.php');
}
else
{
?><script>alert ("Mobile Number, Already Registered");</script>
<?}
}