php - Mysqli Prepare statement not working -


i getting following error when attempting execute prepared statement using mysqli.

any determine doing incorrectly appreciated.

fatal error: call member function prepare() on non-object in etc.

i connecting using statement:

<?php $dbhost = "localhost"; $dbuser = "xxxxxx"; $dbpass = "xxxxxx"; $dbname = "creati38_chicos"; $dbconn = new mysqli($dbhost, $dbuser, $dbpass, $dbname); // check connection if ($dbconn->connect_error) { //echo $dbconn->connect_error; die('sorry, having problems right now. please check later.');  } else{ echo "you have connected successfully"; } ?> 

i using statement:

<?php if ((isset($_post["update"])) && ($_post["update"] == "update appliance")) {  $stmt = $mysqli->prepare("update appliances set     category = ?,     make = ?,     model = ?,      description = ?,      price = ?      id = ?"); $stmt->bind_param('ssssdi',     $_post['category'],     $_post['make'],     $_post['model'],     $_post['description'],     $_post['price'],     $_post['id']); $stmt->execute(); $stmt->close();  }  ?> 

it's not $mysqli->prepare( in case $dbconn->prepare(


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -