So I found a tutorial online on creating a very basic game. I have all the files uploaded correctly but everytime i log in i keep getting a error.
Notice: Undefined index: name in C:\xampp\htdocs\game2\Safe.php on line 83
Here is the code
$sql = "SELECT id FROM crimetimes WHERE name='".mysql_real_escape_string($_POST['name'])."'";
$query = mysql_query($sql) or die(mysql_error());
$m_count = mysql_num_rows($query);
if($m_count >= "1"){
}else{
$sql = "INSERT INTO crimetimes SET id = '$id' , name = '$name', crime1 = '0' , crime1a = '0' , crime2 = '0' ,crime2a = '0' , crime3 = '0' , crime3a = '0' , crime4 = '0' , crime4a = '0' , crime5 = '0' , crime5a = '0'";
$res = mysql_query($sql);
}
I'm not exactly sure what is wrong with this and was wondering if someone could help me fix it. I am trying to get a very basic engine running correctly so i can mess around with it and learn some php while learning how to code properly in my classes in college and eventually create my own game. Any help would be appreciated