Problem with prepared statements

General discussions related to php

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Sat Jan 04, 2014 5:27 am

Problem with prepared statements

Postby chiba2012 » Sat Jan 04, 2014 5:31 am

Code: Select all

function register($first_name,$last_name,$email,$password)

   $conn = new mysqli(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME);
   $stmt = $conn->prepare("insert into users values (null, ?,?,?,?,? NOW())");


This is the database i'm trying to insert into, id is auo increment.

Type Collation
id int(10)
first_name varchar(45)
last_name varchar(45)
email varchar(80)
pass varchar(40)
level int(10)
date_joined datetime

I get this error
Fatal error: Call to a member function bind_param() on a non-object in /home/content/27/9433527/html/core/functions.php on line 27

How can I fix it?

Return to “PHP General”

Who is online

Users browsing this forum: Bing [Bot] and 2 guests