Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8230299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:05:09+00:00 2026-06-07T17:05:09+00:00

Is there any way to send data from controller to view. what I am

  • 0

Is there any way to send data from controller to view.
what I am doing is that user has the option of links and according to links user clicks the corresponding data is passed to the controller and another view is loaded from controller corresponding to that link.
But I dont know how to do that.
I am using bonfire
here is my controller code :-

function my_tickets() {
        $username = $this->auth->username();
        $this->load->model('helpdesk_model');
        $result_set = $this->helpdesk_model->my_tickets($username);
        foreach($result_set->result()  as $data ) {
            $title[] = $data->title;
            $category[]=$data->category;
            $priority[]=$data->priority;
            $date[]=$data->date;
            $post_status[]=$data->post_status;
            $userfile_path[] = $data->userfile_path;
        }
        $arraysize=count($title);
        Template::set('arraysize',$arraysize);
        Template::set('title',$title);
        Template::set('category',$category);
        Template::set('priority',$priority);
        Template::set('date',$date);
        Template::set('post_status',$post_status);
        Template::set('username',$this->auth->username());
        Template::set('userfile_path',$userfile_path);
        Template::render();
    }
    function full_post(){
        Template::render();
    }
    }

In my model part :-

function my_tickets($username){
        $this->db->select('title,userfile_path,category,priority,date,post_status');
        $this->db->where('username',$username);
        $result = $this->db->get('tbl_tickets');
        return $result;
        }

My views are :-

<?php 
$arraysize =Template::get('arraysize');
$title[] = Template::get('title');
$category[]=Template::set('category');
$priority[]=Template::set('priority');
$date[]=Template::set('date');
$post_status[]=Template::set('post_status');
$username = Template::set('username');
$userfile_path = Template::set('userfile_path');
?>
<h3>Total Number Of posts :&nbsp; <?php echo $arraysize; ?> </h3>
<h2>Your Posts</h2>
<?php echo "serail. title | category | priority | date of starting post | post status "; ?> 
<?php 
    for ($i=0; $i <$arraysize; $i++) { 
    ?>
    <p> <?php echo ($i+1).". ".$title[$i]." | ".$category[$i]." | ".$priority[$i]." | ".$date[$i]." | ".$post_status[$i]; 
            echo "<a href=\"/helpdesk/full_post\">Click to see </a>";
        ?>
    </p>
    <?php
   } 
   ?>

In my full_post controller function I want the parameter which the user clicks in the link click to see.
helpdesk is my controller name.
helpdesk_model is my model name. and
my_tickets is my view name..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T17:05:10+00:00Added an answer on June 7, 2026 at 5:05 pm

    I am doing this with the help of form using hidden fields:-
    I have slightly change my view page like this :-

    for ($i=0; $i <$arraysize; $i++) { 
        echo "<p>".($i+1).". ".$title[$i]." | ".$category[$i]." | ".$priority[$i]." | ".$date[$i]." | ".$post_status[$i]."</p>";
        echo form_open('/helpdesk/full_post');
        echo form_hidden('path',$userfile_path[$i]);
        echo form_submit('submit', 'click to see');
        echo form_close();
       } 
    

    and In controller page I am doing :-

    function full_post(){
            Template::set('path',$this->input->post('path'));
            Template::render();
            }
    

    this is the thing I need, is this good way to do it..?
    Is there any other better idea to do it..?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

is there any way that when i user send an email to admin@xx.com the
beside swfaddress is there any other way to send data from a html page
is there any way to send whats in a text view (im trying to
I know that soap can send XML over http, is there any way to
Is there any convenient way to read and parse data from incoming request. E.g
Is there any possible way to send the html form data to java application
Is there any easy way to move data from localStorage or sessionStorage into a
Is there any way to send array of strings from JavaScript to PHP? I
Is there any way I can send an email, like any frameworks or something.
I was wondering if there was any way through C# or C++ to send

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.