Jump to content

Mysqli_bind_param


karthik.v29

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/260769-mysqli_bind_param/
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.