 <p>You can not to use <code>prepare</code> result without check.<br> It able to return <code>false</code> if any error occured.</p> <pre><code>if ($resolve = $data_base-&gt;prepare("INSERT INTO links VALUES('',?,?)")) { $resolve-&gt;bind_param("ss",$link, $short); // Problematic frame $resolve-&gt;execute(); } else { // You can get error message here printf("Error: %s.&lt;br/&gt;\n", $resolve-&gt;error); // assumed this is mysqli $resolve-&gt;close(); } </code></pre> <p>May be you get sql syntax error, about your insert query should be like this:</p> <pre><code>INSERT INTO links (long_url, title) VALUES (?, ?); </code></pre>