This PHP script is meant to post a users name into a database but it doesnt seem to work properly. The project in unity wont post it correctly and going straight to IP
ADDRESS/addUser.php?NAME=Ryan
also doesnt work. It auto increments the ID as it should but the name field is always blank.
<?php
//Connect
$sql_connect = mysql_connect("IP", "USER", "PASS") or die ("no DB Connection");
//Select Database
mysql_select_db("practiceCrim") or die ("DB not found");
//Post Info To Var
$name = $_POST['NAME'];
//Query
$query = "INSERT INTO Users (Name)
VALUES ('$name')";
//Run The Query, Get Result
$result = mysql_query( $query, $sql_connect );
//Not Really Needed For You
if(!$result)
{
die('Error: ' . mysql_error());
}
//Close The Connection
mysql_close($sql_connect);
?>