Using this code:
$sql = mysql_query("UPDATE tablename SET auth = '$new_auth' WHERE index = '$index'");
I printed out all the variables. It's working correctly, it's just not updating the auth or sometimes with playing around the code it'll just update the first result