sonic00 Posted March 30, 2009 Share Posted March 30, 2009 I am having some problems inserting data into the database Can anybody help? $mysqli1 = new mysqli ("localhost", "root","pogo", "bookingsystem"); $stmt = $mysqli1 -> prepare("INSERT INTO booked(bookedID,dateBookedFor,userID,slotID,roomID) VALUES(?,?,?,?,?)"); //STORE IN VARIABLE $stmt->bind_param('iisss', 4,FROM_UNIXTIME('$dateBookedOn'),$u, 6,'1001'); $_SESSION['Step'] = "Just before condition"; if($stmt -> execute()) { $_SESSION['Step'] = "Data inserted succesfully"; echo "true"; } else { $_SESSION['Step'] = "Data failed to be inserted"; echo "existed"; } Link to comment https://forums.phpfreaks.com/topic/151714-inserting-date-into-mysql-database/ Share on other sites More sharing options...
jesushax Posted March 30, 2009 Share Posted March 30, 2009 what is the error? Link to comment https://forums.phpfreaks.com/topic/151714-inserting-date-into-mysql-database/#findComment-796709 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.