Can't Insert

I can’t insert data into database with php. For syntax I think it’s enough with procedural or pdo
has anyone experienced it too? but strangely only 1 table can’t

Can you give more details on the issue, as well as your code?

for the database table: user

and the syntax is like this

$query_register = query("INSERT INTO user (user_token,user_tanggal,user_status,user_username,user_jenis_kelamin,user_email) VALUES ('$reg_token','$reg_tanggal','$reg_status','$reg_username','$reg_jenis_kelamin','$reg_email')");

for the query() function, I made it myself and have tried it too without the function I created

Why not? Do you get any error message? Does your code actually check for error messages?

I didn’t receive the error message, I also tried it on local server but it worked, not when I tried it on hosting :')

OK, that explains question 2 of the three. Can you please answer question 1 and 3 as well?

To be clear:

  • What exactly do you see that makes you conclude that inserting data does not work?
  • Do you even check for database error messages in your code?

Silly question but do you have anything date related in the data that you are trying to insert?
Best regards

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.