Jump to content

Mysqli Query


ecabrera

Recommended Posts

mysqli_query("INSERT INTO `users` (`email`, `name`, `phone`,`reason`) VALUES ('$email', '$name', '$phone','$reason')");

 

 

i get an error everything i run this

 

Warning: mysqli_query() expects at least 2 parameters, 1 given in /home/content/g/html/phomne/index.php on line 12

 

this is the first time im using mysqli i been using mysql_query

Edited by ecabrera
Link to comment
Share on other sites

Note that you will need to change all your mysql_* functions into their MySQLi equivalents. It is not possible to mix between the two libraries.

Most of the time it's just a question of adding the extra i in the function call, and the connection variable as the first parameter. Though, there are some (subtle) differences, so I highly recommend reading the manual pages for the functions before doing the change.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.