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

Link to comment
https://forums.phpfreaks.com/topic/272397-mysqli-query/
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
https://forums.phpfreaks.com/topic/272397-mysqli-query/#findComment-1401520
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.