Header redirection

hi friends.
i am using demo verson of exeout. if all work well then i will purchage exeout. i have a problem that header(location: path ); is not working in exeout in my system.please help me…

if you have complete manual to use all functions in php please provide me. in your help manual i cant find which php extention is used for which type of function.

You can use a header redirection. The following code will work:

<?php
header("Location: http://www.example.com/");

this code is not working.
so’s an error like
php warning: cannot modify header information- headers already sent by (output started at c:\wamp\www\data\index.php:7) …

please guide me the complete setup for header redirection

Its the error generated as your code gives an output in line number 7 even before using the header.

Header needs to be the head part.
You put the header in first line and see it work, then later alter your code as required so there is no output generated before calling the header.

it works in first line.but i want conditional redirection.for which i want to use header in a if condition.is it possible? if not then give me a way to do so.my code is

<?php if(x==0) { header(location: www.example.com); } ?>

help me.

some one help me on this please.

Hi, just curious to know if you have any blank lines in your code - or characters before the first <?php tag, also I would add a exit(); just after the header(); code. Note: the location: www.example.com must be in " or ’ quotes.

eg

{start of file}
<?php
if(x==0)
{
header("location: www.example.com"); // note - must be in " or ' marks
exit();
}
?>
{end of file}

eg this MIGHT cause an error

{start of file}
  <?php
if(x==0)
{
header("location: www.example.com"); // note - must be in " or ' marks
exit();
}
?>
{end of file}

Looks the same accept there are blank spaces just before the <?php tag.

Please check whether you have not a BOM character (that would not appear in a text editor, use an hex editor or NotePad++) at the beginning of your PHP script.

thanks for your suggestions friends. this problem is solved.a new problem is coming in javascript when i use this.value in a function call.example onchange=“test(this.value)”.please help me.

Start a new topic, because this has no relation with header redirection.