0

php header('location') in blueprint

Hello, I want to use header('location:index.php') function, but the result is like this http://devtest -pusinkakie-isl-1.bpapps.com/w/devtest-pusinkakie-isl-1/index.php?.intl=ID&.lang=id.

How can I substitute it?
And the tag <load-page event=activate>
Is there any value any other than activate to redirect a page?

by
7 Replies
  • what is your confix.xml look like? pay attention to <widget base="BASE".
    perhaps in your case, header: /index.php
    see the / prefix

    cmiiw.
    0
  • That's not what i meant (i dont know why i cant change the "post as:Ohgo" --a)
    I mean i want to do something like this (php code)

    If (condition) {
    goto index page
    }
    else if (another condition)
    {
    goto another page
    }
    else goto some other page

    usually i only use header() function, but it seems i cant use it with blueprint. Any substitute?
    Thx
    :D
    0
  • QUOTE (Ohgo @ Apr 23 2009, 08:14 AM) <{POST_SNAPBACK}>
    That's not what i meant (i dont know why i cant change the "post as:Ohgo" --a)


    i did mean you can use header. i use it in my app. u must make sure the path to the page is correct.
    eg. your app live in http://example.com/myapp/. in yahoo, it is http://yourapp.bapps.com/
    see that it is /myapp/ in your app and / in yahoo. redirection happen first in yahoo.

    cmiiw. anyone?
    0
  • You can use header() to do that in PHP
    I tried following snippet of code in my php file and was redirected correctly on the basis of whatever "id" is set

    ...
    ...
    if($_GET['id'] == 1)
    {
    header('Location:/new.php');
    }
    if($_GET['id'] == 2)
    {
    header('Location:/new1.php');
    }
    ...
    ...


    Thanks!
    0
  • QUOTE (ymail r @ Apr 27 2009, 12:08 PM) <{POST_SNAPBACK}>
    You can use header() to do that in PHP
    I tried following snippet of code in my php file and was redirected correctly on the basis of whatever "id" is set

    ...
    ...
    if($_GET['id'] == 1)
    {
    header('Location:/new.php');
    }
    if($_GET['id'] == 2)
    {
    header('Location:/new1.php');
    }
    ...
    ...


    Thanks!



    i am also this type of code bt blueprint doesnt transfer me to another page...is there any other way of doing the same...!?!?seems blueprint doesnt support the header function which i am using in my php file...it just displays a blank page:(
    0
  • QUOTE (akash s @ Apr 30 2009, 05:04 AM) <{POST_SNAPBACK}>
    i am also this type of code bt blueprint doesnt transfer me to another page...is there any other way of doing the same...!?!?seems blueprint doesnt support the header function which i am using in my php file...it just displays a blank page:(



    Blueprint is not dependent on any language. It's your own development tool and logic to decide the redirection or any other programmable task. Blueprint doesn't have a function called header(). Its PHP in your case that will header function. You need to insert pieces of logic (written in PHP in your case) within your blueprint.
    0
  • QUOTE (widgetsm @ May 3 2009, 10:42 PM) <{POST_SNAPBACK}>
    Blueprint is not dependent on any language. It's your own development tool and logic to decide the redirection or any other programmable task. Blueprint doesn't have a function called header(). Its PHP in your case that will header function. You need to insert pieces of logic (written in PHP in your case) within your blueprint.

    thanx everybody for your support..its working fine now.

    Cheers!
    Ashish
    0
This forum is locked.

Recent Posts

in Blueprint General Discussion