Note that there are some explanatory texts on larger screens.

plurals
  1. POmysqli_insert_query not working
    primarykey
    data
    text
    <p><strong>Warning: mysql_insert_id() expects parameter 1 to be resource, object given in D:\Saharsh\xampp-portable\htdocs\mybareilly\Register\registerOrgs.php on line 196</strong></p> <p>This is the error making me go mad!</p> <p>Please help have to host it tomorrow.</p> <pre><code>$mlink = $_POST['Mlink']; if($_FILES['photo']['name']=='' || $_FILES['photo2']['name']=='' || $_FILES['photo3']['name']=='' || $_FILES['photo4']['name']=='' || $_FILES['photo5']['name']=='' || $_FILES['photo6']['name']=='' || $mlink==''){die('&lt;div id="redcbox"&gt;&lt;h2&gt;Fill in all the Fields&lt;/h2&gt;&lt;/div&gt;');} $query = "INSERT INTO `".$plan."` (`name`, `add`, `area`, `phone`, `email`, `experts`, `wsite`, `products`, `describe`, `offers`, `id`, `when`) VALUES ('".$name."', '".$add."', '".$area."', '".$phone."', '".$email."', '".$experts."', '".$wsite."', '".$products."', '".$describe."', '".$offers."', NULL, CURRENT_TIMESTAMP);"; if($uquery = mysqli_query($uconn, $query) &amp;&amp; $bquery = mysqli_query($bconn, $query)){ echo'&lt;div id="sblucbox"&gt; &lt;h1&gt;Success&lt;/h1&gt; &lt;h2&gt;Your Entry Stored in mybareilly.in&lt;/div&gt; &lt;/h2&gt; &lt;/div&gt;'; } else{ echo '&lt;div id="redcbox"&gt; &lt;h1&gt;ERROR!!!&lt;/h1&gt; &lt;h3&gt;'.mysqli_error($uconn).'&lt;/h3&gt; &lt;h3&gt;'.mysqli_error($bconn).'&lt;/h3&gt; &lt;/div&gt;'; } $id = mysql_insert_id($uconn); simpleupload($plan, $id, 'photo'); simpleupload($plan, $id, 'photo2'); simpleupload($plan, $id, 'photo3'); simpleupload($plan, $id, 'photo4'); simpleupload($plan, $id, 'photo5'); </code></pre> <p>Kindly let me know what am I doing wrong, I wanna get mysql_insert_id() WORKING.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    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.
 

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