I have a mySQL issue that has me stumped for hours!
Context: I am creating a web-application to teach children different musical symbols on touch devices
Problem: after running this individual script, no row is created although last echo argument works.
Wierd: this is modeled after other scripts I have working.
EDIT: I will re-furnish the code with prepared statements after we find the problem.
Here is the code:
<?php
$database_connect = mysql_connect('localhost','ragstudi','*****');
if (!$database_connect) {die ('Not connected to SQL' . mysql_error());};
mysql_select_db('ragstudi_musicGameScores') or die ('db doesnt exist');
$userName = "Jimmy";//$_POST["username"];
$gameLevel = 1;//$_POST["level"];
$gameScore = 2300;//$_POST["score"];
$userGroup = "RagWway";
$highScores = mysql_query("INSERT INTO highScores (name, groupBy, level, score) values('".$userName."','".$userGroup."','".$gameLevel."','".$gameScore."')");
if (!$highScores){
die(
mysql_error()
)
};
The database _musicGameScores is set up like this Id, primary, auto increment, integer name, varchar groupBy, varchar level, integer score, integer
The password is Star'ed out. Thank you all in advance!