-1

I am trying to insert my data into DB on server. This code is working successfully on local server but after host this website on live server this code is not working...

$query=mysqli_query($dbc,"INSERT INTO `users_information`(`user_id`,`street_address`,`city,country`,`phone,blood_group`,`gender,lat`,`lng,last_donate_date`)VALUES (`$current_user_id`,`$street_address`,`$city`,`$country`,`$phone`,`$blood`,`$gender`,`$lat`,`$lng`,`$last_donate_date`)");
GYaN
  • 2,327
  • 4
  • 19
  • 39

1 Answers1

0

if I am not mistaken, you are missing the single quotes in insert values. Try this,

$query=mysqli_query($dbc,"INSERT INTO users_information(user_id,street_address,city,country,phone,blood_group,gender,lat,lng,last_donate_date) VALUES ('$current_user_id','$street_address','$city','$country','$phone','$blood','$gender','$lat','$lng','$last_donate_date')");
Naga
  • 2,190
  • 3
  • 16
  • 21