Redirecting the page

Hi
iam a new to PHP and like this language... could somebody explain how yo redirect a page?...but i tried the following method
<?php
header("Location: http://www.yahoo.com");
?>
it works fine in a page contains only redirection...but if we give in the middle of coding it bombs and throws an error :"Header already Sent..."
Thankls in Advance
-venkatraj

Comments

  • use javascript for that. But you can make a php function for that.

    [code]
    <?php
    function redirect($URL) {
    echo "<SCRIPT TYPE=text/javascript>
    ";
    echo "
    ";
    echo "
    ";
    }
    ?>
    [/code]

    call from php

    redirect("http://blaat");

    and voila


    : Hi
    : iam a new to PHP and like this language... could somebody explain how yo redirect a page?...but i tried the following method
    : <?php
    : header("Location: http://www.yahoo.com");
    : ?>
    : it works fine in a page contains only redirection...but if we give in the middle of coding it bombs and throws an error :"Header already Sent..."
    : Thankls in Advance
    : -venkatraj
    :

    [size=5][italic][blue]Dar[RED]Q[/RED][/blue][/italic][/size]
    url--> http://space.servehttp.com (ssh,ftp,http,smtp,jabber etc etc)

  • hi
    did you try using simple tag style redirection?


  • Hello guys,
    Thanx for ur response,Anyway we got that with the same method...
    -venkat
  • Hello guys,
    Thanx for ur response,Anyway we got that with the same method...
    -venkat
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories