karthik.v29 Posted April 11, 2012 Share Posted April 11, 2012 function insertUserTeam($user_id,$teamname,$driver1,$driver2,$driver3,$sum){ $userid = (int)$user_id; $sum1 = (int)$sum; $link = mysqli_connect('localhost', 'user', 'pwd','db'); if($stmt = mysqli_prepare($link,"Insert into User_Team (User_ID,UTeam_Name,UTeam_Driver1,UTeam_Driver2,UTeam_Driver3,UTeam_Budget,UTeam_Points,UTeam_Susbtitue) VALUES (?,?,?,?,?,?,'0','N')")){ echo "Hello"; mysqli_stmt_bind_param($stmt,'issssi',$userid,$teamname,$driver1,$driver2,$driver3,$sum1); mysqli_stmt_execute($stmt); mysqli_stmt_close($stmt); echo "Success"; } insertUserTeam($user_id,$teamname,$driver1,$driver2,$driver3,$sum); Hey guys i am not able to insert the record in the DB. Any ideas why. There is no error on the page and the page executes fully Thanks Quote Link to comment https://forums.phpfreaks.com/topic/260769-mysqli_bind_param/ Share on other sites More sharing options...
fenway Posted April 14, 2012 Share Posted April 14, 2012 Echo the actual query. Quote Link to comment https://forums.phpfreaks.com/topic/260769-mysqli_bind_param/#findComment-1337385 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.