Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In your controller, you can send the POST data through as a parameter of the insert_entry() function:</p> <pre><code>$this-&gt;Login_model-&gt;insert_entry($this-&gt;input-&gt;post()); </code></pre> <p>There is also a minus sign in place of the equals sign in your first line of the insert_entry() function. You can change your insert_entry() function to something along the lines of:</p> <pre><code>function insert_entry($data) { $this-&gt;db-&gt;insert('users', $data); } </code></pre> <p><strong>NOTE:</strong> Remember to validate this data before trying to submit it to the database. </p> <p>Another issue I am seeing is that you are searching the POST data, but the URL is sending GET data. There a multiple ways to solve this, the easiest of which is to check the GET stream. You could use either of the following:</p> <pre><code>$this-&gt;input-&gt;get(); </code></pre> <p>or:</p> <pre><code>$this-&gt;input-&gt;get_post(); </code></pre> <p>The first will check your GET data, while the second will check both the GET and POST, starting with the POST.</p> <p>In your controller, assuming these fields are in your GET data, you can do the following:</p> <pre><code>$data = array( 'gid' =&gt; $this-&gt;input-&gt;get('gid'), 'name' =&gt; $this-&gt;input-&gt;get('name'), 'pic' =&gt; $this-&gt;input-&gt;get('pic'), 'link' =&gt; $this-&gt;input-&gt;get('link') ); </code></pre> <p>You can read more about this in the CodeIgniter documentation at <a href="http://ellislab.com/codeigniter/user-guide/libraries/input.html" rel="nofollow">http://ellislab.com/codeigniter/user-guide/libraries/input.html</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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