Welcome Guest, Not a member yet? Register   Sign In
Header and redirect

Hello, I have a problem with a script, not because they will not let me redirect. I have done looking at the guide, and without output anything(only process something) in the redirect page.

I've been looking at the forum, but I have not found anything that I can help

Here is the Code: add.php
class add extends Controller

        function add()
         //  $this->load->model->('op_que_trnsfer');


        function index() {

(other functions....)

function cl(){ //First Step

<a href="http://www.example.com/add/ct">dr</a>  
&lt;? }

function ct(){  //Second Step
$hoy = date("m.d.y His");  
redirect('add/ct2/'.$key, 'location', 301);

function ct2($key){ //Third Step
echo $key;

Im want to do:
Link to ct->in ct, process key, and send it by url, and redirect->Output it in ct2

Plz, if someone else can help me. Thanks ^^

EDIT:I forgot the error:

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /usr/home/web_domain/www/system/application/config/database.php:1)

Filename: helpers/url_helper.php

Line Number: 485

In ulr_helper, Line Numer:485:

if ( ! function_exists('redirect'))
    function redirect($uri = '', $method = 'location', $http_response_code = 302)
            case 'refresh'    : header("Refresh:0;url=".site_url($uri));
            default            : header("Location: ".site_url($uri), TRUE, $http_response_code);

Messages In This Thread
Header and redirect - by El Forum - 01-13-2009, 05:40 PM
Header and redirect - by El Forum - 01-13-2009, 09:03 PM
Header and redirect - by El Forum - 01-14-2009, 12:20 AM
Header and redirect - by El Forum - 01-14-2009, 05:12 AM

Theme © iAndrew 2016 - Forum software by © MyBB