Topic: Not a prob, but a question!
Hello.
I was wondering how I could add a row to a table in the database when a user registers. I want to have 'scores' for my site, and it would be easiest to do it with another table, instead of adding on to the 'users' table. I do have the id auto incrementing, and all of the scores start at zero.
So my question is, what is the accurate code for inserting a row, and where do I put it? I looked in register.php, but I am not sure where it would go.
My current code is this:
//Insert another row for the highscores for that user
$db->query('INSERT INTO '.$db->prefix.'scores (`username`) VALUES ($username)');
But if that is correct, I must have it in the wrong spot.
Thanks for your help!
-AG