Note that there are some explanatory texts on larger screens.

plurals
  1. POcan't display multiple checkbox save value in codeigniter
    text
    copied!<p>I can't display Multiple checkbox save value in my view page. Here is the insert/save value details:</p> <h2>Model:</h2> <pre><code>public function saveInstituteOfferdCourse($data = array()) { if ($this-&gt;db-&gt;insert('tbl_course_offred', $data)) { return $this-&gt;db-&gt;insert_id(); // tbl_course_offred = "Table name" } return FALSE; } </code></pre> <h2>Controller:</h2> <pre><code>public function saveCourses() { $data = array(); $this-&gt;load-&gt;library('form_validation'); $this-&gt;form_validation-&gt;set_rules('skill', 'skill', 'require'); if ($this-&gt;form_validation-&gt;run()) { $skill = implode(',', $this-&gt;input-&gt;post('skill')); $data['skill'] = $skill; $data['user_id'] = $this-&gt;session-&gt;userdata('user_id'); $this-&gt;user_admin_model-&gt;saveInstituteOfferdCourse($data); redirect("user_admin_controller/showInsSkills"); } } </code></pre> <h2>View:</h2> <pre><code>&lt;form name="form" method="post" action="tambah"&gt; &lt;input type="checkbox" name="skill[]" value="PHP" &gt;PHP&lt;/input &lt;input type="checkbox" name="skill[]" value="VB.NET" &gt;VB.NET&lt;/input &lt;input type="checkbox" name="skill[]" value="C#" &gt;C#&lt;/input &lt;input type="submit" value="Submit" /&gt; &lt;/form&gt; </code></pre> <p>I want to display value like below site courses.<br> <a href="http://www.yet5.com/training-institute/yet5/5955/coimbatore/mazenet-gandhipuram-at-gandhipuram.html" rel="nofollow noreferrer">http://www.yet5.com/training-institute/yet5/5955/coimbatore/mazenet-gandhipuram-at-gandhipuram.html</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload