Welcome Guest, Not a member yet? Register   Sign In
how can i pass array from view to controller ?
#1

[eluser]aamiraziz[/eluser]
i am working on job portal..

i need to pass the JobID & CVID from view to controller.

how can i do that ???

i am trying this.

$info = array(
"cvid" => $x,
"jbid" => $jobid
);

// Apply Using this CV
echo "<td>";
echo "<li class='register'><a href=";
echo site_url('jbcontroller/applyjob/'.$info.'/');
echo">Apply by this CV</li>";
echo "</td>";

how can i get the values of these variables in controller file ??
i am trying this..

// Apply This Job
function applyjob($id1){
$y = $id1['cvid']; // cvid
$z = $id1['jbid']; // JobID

$data = $this->jbmodel->mapplyjob($z, $y); // (jobid, cvid)
redirect('welcome/app_home');

}

but the values of these varibles are not availible in model file..
what can be the problem?

ERROR that i am receiving is:


A Database Error Occurred

Error Number: 1452

Cannot add or update a child row: a foreign key constraint fails (`findjobspk/apjob`, CONSTRAINT `apjob_ibfk_5` FOREIGN KEY (`JobID`) REFERENCES `job` (`JobID`) ON DELETE NO ACTION ON UPDATE CASCADE)

INSERT INTO apjob(JobID, CVID, Ajdt) VALUES ('A', 'A', '2009-07-06')



Thanks


Messages In This Thread
how can i pass array from view to controller ? - by El Forum - 07-06-2009, 12:12 AM
how can i pass array from view to controller ? - by El Forum - 07-06-2009, 12:26 AM
how can i pass array from view to controller ? - by El Forum - 07-06-2009, 12:50 AM
how can i pass array from view to controller ? - by El Forum - 07-06-2009, 01:02 AM



Theme © iAndrew 2016 - Forum software by © MyBB