Download

Help with writing to database with JSON plugin

I was wondering if anyone could help me im going to pull my hair out !!!

the site variable is set to = http://3kdesigns.com/Dust/test.php?username=

here is the website code …

<?php
header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=UTF-8");

	$host = "removed for safety";
	$user = "removed for safety";
	$pass = "removed for safety";
	$name = "removed for safety";
	
	$conn = mysql_connect($host,$user,$pass) or die ("Hata : ".mysql_error());
	$select = mysql_select_db($name,$conn) or die ("Hata : ".mysql_error());
	
	@$username = $_GET"username"];

	

	if (empty($username)) {
		echo json_encode(array('result' => "fail",'result_string' => "Pleasefillinallrequiredfields!"));
	}else{
		
		if ($usernamecontrol > 0) {
			echo json_encode(array('result' => "fail",'result_string' => "Accountnameisused"));
		}else{
			$adduser = mysql_query("INSERT INTO user_accounts(username,password,role,isBanned,isOnline)VALUES('$username','0','0','0','0')");
			if ($adduser) {
				echo json_encode(array('result' => "ok",'result_string' => "RegisterCompleted"));
			}
		}
		}
	
 
$conn->close();
 
?>

At what point is it failing? Outbound from client? Inbound to server?

I’d make sure your server endpoint is actually working, then do a network capture to look for client issues.