Welcome Guest, Not a member yet? Register   Sign In
passing data from view to controller function?
#1

[eluser]Bhavani Shekhawat[/eluser]
view
Code:
<h1> Your Artifacts </h1>

&lt;link rel="stylesheet" type="text/css" href="css/button.css" title="Default"&gt;

&lt;?php foreach ($rows as $r): ?&gt;
                
&lt;?php echo anchor('site/click_artifact', $r->ArtifactID); ?&gt; |
&lt;?php echo $r->Description; ?&gt; |
&lt;?php echo $r->EnteredDate; ?&gt; |
<p class = "result"> &lt;?php echo anchor('site/delete_artifact'.$r->ArtifactID, "Delete Artifact"); ?&gt; </p>
<p class = "result"> &lt;?php echo anchor('site/modify_artifact'.$r->ArtifactID, "Modify Artifact"); ?&gt; </p>

      
&lt;?php echo "</br>"; ?&gt;

&lt;?php endforeach; ?&gt;

controller
Code:
function click_artifact($link){
              
              $this->members_area();
              $getLink = $link;
              $this->load->model('artifact_model');
              $data['rows'] = $this->artifact_model->display_artifact($getLink);
              $this->load->view('view_artifact', $data);
          }

I basically need the artifactID back from the view. what I want is that when a user clicks on the artifact id link it should get him the details related to that artifact id stored in the db.


Messages In This Thread
passing data from view to controller function? - by El Forum - 07-13-2010, 04:32 PM
passing data from view to controller function? - by El Forum - 07-13-2010, 04:58 PM
passing data from view to controller function? - by El Forum - 07-13-2010, 05:03 PM
passing data from view to controller function? - by El Forum - 07-13-2010, 05:13 PM
passing data from view to controller function? - by El Forum - 07-13-2010, 05:25 PM
passing data from view to controller function? - by El Forum - 07-13-2010, 05:42 PM
passing data from view to controller function? - by El Forum - 07-13-2010, 05:53 PM
passing data from view to controller function? - by El Forum - 07-13-2010, 06:50 PM
passing data from view to controller function? - by El Forum - 07-14-2010, 11:32 AM
passing data from view to controller function? - by El Forum - 07-14-2010, 11:39 AM
passing data from view to controller function? - by El Forum - 07-14-2010, 06:57 PM
passing data from view to controller function? - by El Forum - 07-14-2010, 07:16 PM
passing data from view to controller function? - by El Forum - 07-15-2010, 06:20 PM
passing data from view to controller function? - by El Forum - 07-15-2010, 07:07 PM
passing data from view to controller function? - by El Forum - 07-15-2010, 07:46 PM
passing data from view to controller function? - by El Forum - 07-15-2010, 08:13 PM



Theme © iAndrew 2016 - Forum software by © MyBB