Jump to content

ifyrlucky

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Posts posted by ifyrlucky

  1. I tried the new code and got the following error.

    Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /htdocs/www/ikaika/redirect.php on line 6

    again the code used was:

    <?php require_once("application.php");?>
    <?php include("CWIncLoginForm.php");?>
    <?php if (isset($_SESSION["customerID"]) && $_SESSION["customerID"] != "0") { ?>
    <?
    if($HTTP_HOST=="www.napoleonp.org/ikaika/redirect.php" or $HTTP_HOST == "napoleonp.org/ikaika/redirect.php"){
    header("Location: $row_rsCWGetCustomerData['cst_weburl']");
    }?>

    sorry for all the problems.

    quote name='wildteen88' date='Apr 11 2006, 01:43 AM' post='363577']
    Umm, you dont need to use echo when getting value from variable to be used in a funtion. The following should work:
    [code]header("Location: $row_rsCWGetCustomerData['cst_weburl']");[/code]
    [/quote]
  2. I tried the new code without the <? ?>. I now get a Parse error: parse error, unexpected $ in /htdocs/www/ikaika/redirect.php on line 7
    using

    <?php require_once("application.php");?>
    <?php include("CWIncLoginForm.php");?>
    <?php if (isset($_SESSION["customerID"]) && $_SESSION["customerID"] != "0") { ?>
    <?php
    if($HTTP_HOST=="www.napoleonp.org/ikaika/redirect.php" or $HTTP_HOST == "napoleonp.org/ikaika/redirect.php"){
    header("Location: echo($row_rsCWGetCustomerData[cst_weburl]); ");
    }?>

    Any Ideas why I'm getting this error?


    [!--quoteo(post=363560:date=Apr 11 2006, 12:32 AM:name=shortj75)--][div class=\'quotetop\']QUOTE(shortj75 @ Apr 11 2006, 12:32 AM) [snapback]363560[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    this is php code already you some <? ?> you dont need that may be you problem try this

    [code]
    <?
    if($HTTP_HOST=="www.napoleonp.org/ikaika/redirect.php" or $HTTP_HOST == "napoleonp.org/ikaika/redirect.php"){
    header("Location:  echo($row_rsCWGetCustomerData[cst_weburl]); ");
    }?>
    [/code]
    that should work
    [/quote]
  3. when a customer goes to a specific page I want them redirected to their own page. I have set up the redirect code and created a database that has a URL address for each client. What I'm having a problem with is pulling the specific client URL from within the php redirect code. I keep on getting an error message on the page. The Code I'm using is below. How can I pull up the clients URL address under location without getting an error message?

    if($HTTP_HOST=="www.napoleonp.org/ikaika/redirect.php" or $HTTP_HOST == "napoleonp.org/ikaika/redirect.php"){
    header("Location: <?php echo($row_rsCWGetCustomerData["cst_weburl"]); ?>");
    }?>
  4. I want one domain name to go to the index and another to go to a specific page within the website. I am using the following code in the header of the index, but to no result. Can anyone tell me how to fix this?

    <?php
    if ($HTTP_HOST=="http://www.chickswhostick.com" or $HTTP_HOST=="www.chickswhostick.com" or $HTTP_HOST=="chickswhostick.com")
    {
    header("Location: [a href=\"http://www.chickswhostick.com/teamitgurl.php");\" target=\"_blank\"]http://www.chickswhostick.com/teamitgurl.php");[/a]
    } /* Redirect browser */

    /* Make sure that code below does not get executed when we redirect. */
    exit;
    ?>
  5. I want one domain address to go to the index.php and the domain alias to go to another page within the website. I am told this is done with a header redirect? I have been given this code

    <?php
    header("Location: [a href=\"http://www.example.com/");\" target=\"_blank\"]http://www.example.com/");[/a] /* Redirect browser */

    /* Make sure that code below does not get executed when we redirect. */
    exit;
    ?>

    But I'm not sure exactly how it works or how to modify it to my needs, specifically where I need to type in the domain name alias and where I need to type in the url for the page I want it directed to.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.