PHP / CodeIgniter: tıklandığında link çalışmıyor, ama güzel yeni sekmede açarsa

0 Cevap php

Belirli bir sayfada ben db belli bir alan açıp kapatan bir düğme var. Fonksiyonudur

 function source_toggle_paid($event_id = null, $attendee_id = null)
{
    $this->authentication->checkLogin(); // Check if the user is logged in

    // Check the parameters provided are null
    if ($attendee_id == null || $event_id == null)
    {

        // If either attendee or event ids given are null, give an error message
        $data = array(
                        'type' => 'error',
                        'message' => $this->message_list->get('DOES_NOT_EXIST', 'attendee') . ' ' . $this->message_list->get('BACK_TO_SOURCE_HOME')
        );

        // Output the error message

        $this->load->view('template/main_header');
        $this->load->view('template/message', $data);
        $this->load->view('template/main_footer');  

    }
    else    // Otherwise, parameters are not null
    {


        //Load the attendee model, and toggle the paid status of the attendee
        $this->load->model('Attendee');
        $this->Attendee->toggle_field('paid',$attendee_id);
        //Redirect the user back to the attendees page, with the used search term
        redirect('admin/source_attendees/'.$event_id);
                    //redirect('admin/source_attendees/'.$event_id);


    }
}

Ben 404 sayfaya yönlendiriliyorsunuz olsun ve dp daha fazla oynama üzerine, değişmeden butonuna tıkladığınızda ben işlev ulaşmış olmaktan asla buldum. Ben url yazın Ancak elle çalışır, ve ben sağ tıklayın ve yeni sekmede açık varsa, o da çalışır

0 Cevap