I have this piece of PHP code installed on a server where i have also installed a DataBase. When i try to run it via URL http://ptyxiaki2016.eu.pn/login.php?email=tade&password=1234 I got NULL to all the values.
tade 1234 {"error":false,"uid":null,"user":{"name":null,"surname":null,"country":null,"email":null,"password":null,"telephone":null}}
My PHP code is below:
<?php
require_once 'DB_Functions.php';
require_once 'DB_Connect.php';
$db = new DB_Functions();
// json response array
$response = array("error" => FALSE);
if (isset($_GET['email']) && isset($_GET['password'])) {
// receiving the post params
$email = $_GET['email'];
$password = $_GET['password'];
// get the user by email and password
$user = $db->getUserByEmailAndPassword($email, $password);
if ($user != false) {
// user is found
$response["uid"] = $user["oid"];
$response["error"] = FALSE;
$response["uid"] = $user["oid"];
$response["user"]["name"] = $user["name"];
$response["user"]["surname"] = $user["surname"];
$response["user"]["country"] = $user["country"];
$response["user"]["email"] = $user["email"];
$response["user"]["password"] = $user["password"];
$response["user"]["telephone"] = $user["telephone"];
echo json_encode($response);
} else {
// user is not found with the credentials
$response["error"] = TRUE;
$response["error_msg"] = "Login credentials are wrong. Please try again!";
echo json_encode($response);
}
} else {
// required post params is missing
$response["error"] = TRUE;
$response["error_msg"] = "Required parameters email or password is missing!";
echo json_encode($response);
}
?>
And this is the function getUserByEmailAndPassword() i call in the login. It is inside the DB_Functions.php I include.
public function getUserByEmailAndPassword($email, $password) {
$stmt = $this->conn->prepare("SELECT * FROM owner WHERE email = ?");
$stmt->bind_param("s", $email);
if ($stmt->execute()) {
$user = $stmt->bind_result($oid, $name, $surname, $country, $email, $password, $telephone);
while ($stmt->fetch()) {
printf("%s %s\n", $email, $password);
}
$stmt->close();
return $user;
}
}
What am I missing here? My DB is OK, but, how can i retrieve the data?
Error is here:
$user = $stmt->bind_result($oid, $name, $surname, $country, $email, $password, $telephone);
You bind result to variables ($oid, $name, ...), but return $user.
bind_result returns result of operation (true/false), but not result of query.
So result of call to getUserByEmailAndPassword() is bool value. If you'll run instead of echo json_encode($response) echo json_encode($user) you'll see it.
UPD: try this code instead of yours
if ($stmt->execute()) {
$stmt->bind_result($user["oid"], $user["name"], ...)
while ($stmt->fetch()) {
printf("%s %s\n", $email, $password);
}
Related
i am learning how to connect android app with php admin panel with volley and for this i used a tutorial from Javatpoint , but i made two files as they told me to create and checked apicall in Postman web, i got this error:
"error":true,"message":"required parameters are not available"
i attached screenshot too
here is the structure of the tables where i want to get data from.
can anyone help me about this error, i really don't know how to solve it.
<?php
require_once 'connection.php';
$response = array();
if(isset($_GET['apicall'])){
switch($_GET['apicall']){
case 'signup':
if(isTheseParametersAvailable(array('username','email','password',))){
$username = $_POST['username'];
$email = $_POST['email'];
$password = md5($_POST['password']);
$stmt = $conn->prepare("SELECT user_id FROM ci_users WHERE username = ? OR email = ?");
$stmt->bind_param("ss", $username, $email);
$stmt->execute();
$stmt->store_result();
if($stmt->num_rows > 0){
$response['error'] = true;
$response['message'] = 'User already registered';
$stmt->close();
}
else{
$stmt = $conn->prepare("INSERT INTO ci_users (username, email, password,) VALUES (?, ?, ?, ?)");
$stmt->bind_param("ssss", $username, $email, $password);
if($stmt->execute()){
$stmt = $conn->prepare("SELECT user_id,id, username, email, FROM users WHERE username = ?");
$stmt->bind_param("s",$username);
$stmt->execute();
$stmt->bind_result($user_id, $id, $username, $email);
$stmt->fetch();
$user = array(
'id'=>$id,
'username'=>$username,
'email'=>$email,
);
$stmt->close();
$response['error'] = false;
$response['message'] = 'User registered successfully';
$response['user'] = $user;
}
}
}
else{
$response['error'] = true;
$response['message'] = 'required parameters are not available';
}
break;
case 'login':
if(isTheseParametersAvailable(array('username', 'password'))){
$username = $_POST['username'];
$password = md5($_POST['password']);
$stmt = $conn->prepare("SELECT user_id, username, email, mobile_no FROM ci_users WHERE username = ? AND password = ?");
$stmt->bind_param("ss",$username, $password);
$stmt->execute();
$stmt->store_result();
if($stmt->num_rows > 0){
$stmt->bind_result($id, $username, $email, $mobile);
$stmt->fetch();
$user = array(
'id'=>$id,
'username'=>$username,
'email'=>$email,
'mobile'=>$mobile
);
$response['error'] = false;
$response['message'] = 'Login successfull';
$response['user'] = $user;
}
else{
$response['error'] = false;
$response['message'] = 'Invalid username or password';
}
}
break;
default:
$response['error'] = true;
$response['message'] = 'Invalid Operation Called';
}
}
else{
$response['error'] = true;
$response['message'] = 'Invalid API Call';
}
echo json_encode($response);
function isTheseParametersAvailable($params){
foreach($params as $param){
if(!isset($_POST[$param])){
return false;
}
}
return true;
}
?>
As I have read your code, it is correct no problem in your code. but the only problem is the postman request data.
According to the method
isTheseParametersAvailable(array('username','email','password',))
you must send these 3 parameters as a request parameter from your postman but according to your attached postman screen , you have not passed any variables ('username','email','password') and their values under body section.
you have not send any reuest data from postman so according to the definition of this isTheseParametersAvailable function, this function return false and your code return this message "required parameters are not available"
Looking at your screenshot and php code you have provided. You may have forgot to send three post parameters namely 'username','email','password' in the body of the request. Which is checked by the function isTheseParametersAvailable in the api endpoint. As given in https://www.javatpoint.com/android-volley-library-registration-login-logout. Your postman request body should look like below.
Error Domain=NSCocoaErrorDomain Code=3840 "No value." UserInfo={NSDebugDescription=No value.}
I am getting this error and I'm not understand why there is no value. When I printed out the values for the username before the JSONSerialization line, the values are available. Any help is greatly appreciated.
Here is DBoperations php file
class DbOperation {
private $connect;
//Constructor
function __construct() {
require_once dirname(__FILE__). '/Constants.php';
require_once dirname(__FILE__). '/DbConnect.php';
//opening db connection
$database = new DbConnect();
$this->connect = $database->connect();
}
//This method is taking a username and password and verifying it from the database
public function userLogin($username, $pass) {
$pass = md5($pass);
$statement = $this->connect->prepare("SELECT id FROM users WHERE username = ? AND password = ?");
$statement->bind_param("ss", $username, $password);
$statement->execute();
$statement->store_result();
return $statement->num_rows > 0;
}
//After the successful login we will call this method to return the user data in an array
public function getUserByUsername($username) {
$statement = $this->connect->prepare("SELECT id, username, email FROM users WHERE username = ?");
$statement->bind_param("s", $username);
$statement->execute();
$statement->bind_result($id, $uname, $email);
$statement->fetch();
$user = array();
$user['id'] = $id;
$user['username'] = $uname;
$user['email'] = $email;
return $user;
}
//Function to create a new user
public function createUser($username, $password, $email, $name) {
if (!$this->isUserExist($username, $email)) {
$pass = md5($password);
$statement = $this->connect->prepare("INSERT INTO users (username, password, email, name) VALUES (?, ?, ?, ?)");
$statement->bind_param("sssss", $username, $pass, $email, $name);
if ($statement->execute()) {
return USER_CREATED;
} else {
return USER_NOT_CREATED;
}
} else {
return USER_ALREADY_EXIST;
}
}
private function isUserExist($username, $email) {
$statement = $this->connect->prepare("SELECT id FROM users WHERE username = ? OR email = ?");
$statement->bind_param("sss", $username, $email);
$statement->execute();
$statement->store_result();
return $statement->num_rows > 0;
}
}
And Here is my registration PHP file
//importing required script
require_once './includes/DbOperation.php';
$response = array();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if (!verifyRequiredParams(array('username', 'password', 'email', 'name'))) {
//getting values
$username = $_POST['username'];
$password = $_POST['password'];
$email = $_POST['email'];
$name = $_POST['name'];
//creating database operation on object
$database = new DbOperation();
//adding user to database
$result = $database->createUser($username, $password, $email, $name);
//making the response accordingly
if ($result == USER_CREATED) {
$response['error'] = false;
$response['message'] = 'User was created successfully';
} elseif ($result == USER_ALREADY_EXIST) {
$response['error'] = true;
$response['message'] = 'This user already Exist!';
} elseif ($result == USER_NOT_CREATED) {
$response['error'] = true;
$response['message'] = 'Some error occurred';
}
} else {
$response['error'] = true;
$response['message'] = 'Required parameters are missing';
}
} else {
$response['error'] = true;
$response['message'] = 'Invalid request';
}
//function to validate the required paramter in request
function verifyRequiredParams($required_fields) {
//Getting the request parameters
$request_params = $_REQUEST;
//Looping through all the parameters
foreach ($required_fields as $field) {
//if any required parameter is missing
if (!isset($request_params[$field]) || strlen(trim($request_params[$field])) <= 0) {
//return true
return true;
}
}
return false;
}
echo json_encode($response);
This is the swift code for the user to register.
#objc func registerUser(button: UIButton) {
let username = userName.text!
let password = passWord.text!
let email = emailField.text!
let name = nameField.text!
//Creating parameters for post request
let parameters: Parameters = ["username": username, "password": password, "email": email, "name": name]
guard let url = URL(string: "http://localhost/TestingiOSApp/v1/register.php") else { return }
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
guard let httpBody = try? JSONSerialization.data(withJSONObject: parameters, options: []) else { return }
request.httpBody = httpBody
let session = URLSession.shared
session.dataTask(with: request) { (data, response, error) in
if let response = response {
print(response)
}
if let data = data {
do {
let json = try JSONSerialization.jsonObject(with: data, options: [])
print(json)
} catch {
print(error)
}
}
}.resume()
self.view.endEditing(true)
}
//Function to create a new user
public function createUser($username, $password, $email, $name) {
if (!$this->isUserExist($username, $email)) {
$pass = md5($password);
$statement = $this->connect->prepare("INSERT INTO users (username, password, email, name) VALUES (?, ?, ?, ?)");
$statement->bind_param("ssss", $username, $pass, $email, $name);
if ($statement->execute()) {
return USER_CREATED;
} else {
return USER_NOT_CREATED;
}
} else {
return USER_ALREADY_EXIST;
}
}
private function isUserExist($username, $email) {
$statement = $this->connect->prepare("SELECT id FROM users WHERE username = ? OR email = ?");
$statement->bind_param("ss", $username, $email);
$statement->execute();
$statement->store_result();
return $statement->num_rows > 0;
}
Both functions have extra "s" in bind_param
I have this PHP file stored i a server. It creates a new user for the DB. The registration is success but the response message is always NULL.
Here is my register.php file where i post the values
<?php
require_once 'DB_Functions.php';
$db = new DB_Functions();
// json response array
$response = array("error" => FALSE);
if (($_POST['name']) && ($_POST['surname']) && ($_POST['email']) && ($_POST['password']) && ($_POST['telephone'] && ($_POST['country']) ) )
{
// receiving the post params
$name = $_POST['name'];
$surname = $_POST['surname'];
$email = $_POST['email'];
$password = $_POST['password'];
$telephone = $_POST['telephone'];
$country = $_POST['country'];
// check if user is already existed with the same email
if ($db->isOwnerExisted($email)) {
// user already existed
$response["error"] = TRUE;
$response["error_msg"] = "User already exists with " . $email;
echo json_encode($response);
} else {
// create a new user
$user = $db->storeOwner($name, $surname, $email, $password, $telephone, $country);
if ($user) {
// user stored successfully
$response["error"] = FALSE;
$response["oid"] = $user["oid"];
$response["user"]["name"] = $user["name"];
$response["user"]["surname"] = $user["surname"];
$response["user"]["country"] = $user["country"];
$response["user"]["email"] = $user["email"];
$response["user"]["password"] = $user["password"];
$response["user"]["telephone"] = $user["telephone"];
echo json_encode($response);
} else {
// user failed to store
$response["error"] = TRUE;
$response["error_msg"] = "Unknown error occurred in registration!";
echo json_encode($response);
}
}
} else {
$response["error"] = TRUE;
$response["error_msg"] = "Required parameters are missing!";
echo json_encode($response);
}
?>
And the storeOwner function
public function storeOwner($name, $surname, $email, $password, $telephone, $country) {
$hash = $this->hashSSHA($password);
$encrypted_password = $hash["encrypted"]; // encrypted password
$salt = $hash["salt"]; // salt
$stmt = $this->conn->prepare("INSERT INTO owner (oid, name, surname, country, email, password, salt, telephone) VALUES(?, ?, ?, ?, ?, ?, ?, ?)");
$stmt->bind_param("isssssss", $oid, $name, $surname, $country, $email, $encrypted_password, $salt, $telephone);
$result = $stmt->execute();
$stmt->close();
// check for successful store
if ($result) {
$stmt = $this->conn->prepare("SELECT * FROM owner WHERE email = ?");
$stmt->bind_param("s", $email);
$stmt->execute();
$user = $stmt->bind_result($user['oid'], $user['name'], $user['surname'], $user['country'], $user['email'], $user['password'], $user['salt'], $user['telephone']);
while ($stmt->fetch()) {
//printf("%s %s\n", $email, $password);
}
$stmt->close();
return $user;
} else {
return false;
}
}
The output is something like
{"error":false,"uid":null,"user":{"name":null,"surname":null,"country":null,"email":null,"password":null,"telephone":null}}
Why is every field null?
When you're fetching the user, you're currently overwriting the bound results with the response from that method:
$user = $stmt->bind_result($user['oid'], ...);
The method $stmt->bind_result() returns a boolean (true on success and false on error). So your code first sets the values and when that's done, it overwrites them with the result from the method (the boolean).
It should be:
$user = []; // You should create the array before using it.
$stmt->bind_result($user['oid'], ...);
I need help with below codes,I can't figure out why I can't register an account on db.
Below my PHP scripts:
update_user_info.php
<?php
class update_user_info {
public function StoreUserInfo($fullname, $matno, $dept, $phone, $email, $password) {
$hash = $this->hashFunction($password);
$encrypted_password = $hash["encrypted"]; // encrypted password
$salt = $hash["salt"]; // salt
$stmt = $this->conn->prepare("INSERT INTO users(fullname, matno, dept, phone, email, encrypted_password, salt, created_at) VALUES(?, ?, ?, ?, ?, ?, ?, Now())");
$stmt->bind_param("ssssssss", $fullname, $matno, $dept, $phone, $email, $encrypted_password, $salt, $created_at);
$result = $stmt->execute();
$stmt->close();
// check for successful store
if ($result) {
$stmt = $this->conn->prepare("SELECT fullname, matno, dept, phone, email, encrypted_password, salt FROM users WHERE matno = ?");
$stmt->bind_param("s", $matno);
$stmt->execute();
$stmt-> bind_result($token2,$token3,$token4,$token5,$token6,$token7,$token8);
while ( $stmt-> fetch() ) {
$user["fullname"] = $token2;
$user["matno"] = $token3;
$user["dept"] = $token4;
$user["phone"] = $token5;
$user["email"] = $token6;
}
$stmt->close();
return $user;
} else {
return false;
}
}
public function hashFunction($password) {
$salt = sha1(rand());
$salt = substr($salt, 0, 10);
$encrypted = base64_encode(sha1($password . $salt, true) . $salt);
$hash = array("salt" => $salt, "encrypted" => $encrypted);
return $hash;
}
public function VerifyUserAuthentication($matno, $password) {
$stmt = $this->conn->prepare("SELECT fullname, matno, dept, phone, email, encrypted_password, salt FROM users WHERE matno = ?");
$stmt->bind_param("s", $matno);
if ($stmt->execute()) {
$stmt-> bind_result($token2,$token3,$token4,$token5,$token6,$token7,$token8);
while ( $stmt-> fetch() ) {
$user["fullname"] = $token2;
$user["matno"] = $token3;
$user["dept"] = $token4;
$user["phone"] = $token5;
$user["email"] = $token6;
$user["encrypted_password"] = $token7;
$user["salt"] = $token8;
}
$stmt->close();
// verifying user password
$salt = $token8;
$encrypted_password = $token7;
$hash = $this->CheckHashFunction($salt, $password);
// check for password equality
if ($encrypted_password == $hash) {
// user authentication details are correct
return $user;
}
} else {
return NULL;
}
}
public function checkHashFunction($salt, $password) {
$hash = base64_encode(sha1($password . $salt, true) . $salt);
return $hash;
}
public function CheckExistingUser($matno) {
$stmt = $this->conn->prepare("SELECT matno from users WHERE matno = ?");
$stmt->bind_param("s", $matno);
$stmt->execute();
$stmt->store_result();
if ($stmt->num_rows > 0) {
// user existed
$stmt->close();
return true;
} else {
// user not existed
$stmt->close();
return false;
}
}
}
?>
login.php
<?php
require_once 'update_user_info.php';
$db = new update_user_info();
// json response array
$response = array("error" => FALSE);
if (isset($_POST['matno']) && isset($_POST['password'])) {
// receiving the post params
$matno = $_POST['matno'];
$password = $_POST['password'];
// get the user by email and password
$user = $db->VerifyUserAuthentication($matno, $password);
if ($user != false) {
// user is found
$response["error"] = FALSE;
$response["uid"] = $user["unique_id"];
$response["user"]["fullname"] = $user["fullname"];
$response["user"]["email"] = $user["email"];
$response["user"]["matno"] = $user["matno"];
$response["user"]["dept"] = $user["dept"];
$response["user"]["phone"] = $user["phone"];
echo json_encode($response);
} else {
// user is not found with the credentials
$response["error"] = TRUE;
$response["error_msg"] = "Login credentials are wrong. Please try again!";
echo json_encode($response);
}
} else {
// required post params is missing
$response["error"] = TRUE;
$response["error_msg"] = "Required parameters email or password is missing!";
echo json_encode($response);
}
?>
running above on postman and puttin all the required parameters shows below error:
["error_msg"] = "Required parameters email or password is missing!";
register.php
<?php
require_once 'update_user_info.php';
$db = new update_user_info();
// json response array
$response = array("error" => FALSE);
if (isset($_POST['fullname']) && isset($_POST['matnum']) && isset($_POST['depart']) && isset($_POST['phone']) && isset($_POST['email']) && isset($_POST['passworded'])) {
// receiving the post params
$fullname = $_POST['fullname'];
$matno = $_POST['matnum'];
$email = $_POST['email'];
$dept = $_POST['depart'];
$phone = $_POST['phone'];
$password = $_POST['passworded'];
// check if user is already existed with the same email
if ($db->CheckExistingUser($matno)) {
// user already existed
$response["error"] = TRUE;
$response["error_msg"] = "User already existed with " . $matno;
echo json_encode($response);
} else {
// create a new user
$user = $db->StoreUserInfo($fullname, $matno, $dept, $phone, $email, $password);
if ($user) {
// user stored successfully
$response["error"] = FALSE;
$response["user"]["fullname"] = $user["fullname"];
$response["user"]["matno"] = $user["matno"];
$response["user"]["dept"] = $user["dept"];
$response["user"]["phone"] = $user["phone"];
$response["user"]["email"] = $user["email"];
echo json_encode($response);
} else {
// user failed to store
$response["error"] = TRUE;
$response["error_msg"] = "Unknown error occurred in registration!";
echo json_encode($response);
}
}
} else {
$response["error"] = TRUE;
$response["error_msg"] = "Required parameters (fullname, email or password) is missing!";
echo json_encode($response);
}
?>
Running above code in postman with all params filled shows below error:
$response["error_msg"] = "Required parameters (fullname, email or password) is missing!";
I must be doing something wrong. Thank you for your help.
issues resolved. on postman i needed to select x-wwww-form-urlencoded under body option for my script to work. thanks
I am creating a web service for android and PHP registration process.
I am following this tutorial http://www.androidhive.info/2012/01/android-login-and-registration-with-php-mysql-and-sqlite/
The Issue is: My JSON works on localhost but not on a server. On a server it gives me this error but it stores the data on database successfully.
Fatal error: Call to undefined method mysqli_stmt::get_result() in /home/pmc/public_html/zeusonline.me/zeus/include/DB_Functions.php on line 45
and the line 45 is:
$user = $stmt->get_result()->fetch_assoc();
Code samples->
Register.php file
<?php
require_once 'include/DB_Functions.php';
$db = new DB_Functions();
// json response array
$response = array("status" => TRUE);
if (isset($_GET['username']) && isset($_GET['email']) &&
isset($_GET['country']) && isset($_GET['phone_number']) &&
isset($_GET['password']) && isset($_GET['lat']) && isset($_GET['lon'])) {
// receiving the post params
$username = $_GET['username'];
$email = $_GET['email'];
$country = $_GET['country'];
$phone_number = $_GET['phone_number'];
$password = $_GET['password'];
$lat = $_GET['lat'];
$lon = $_GET['lon'];
// check if user is already existed with the same email
if ($db->isUserExisted($email)) {
// user already existed
$response["status"] = FALSE;
$response["error_msg"] = "User already existed with " . $email;
echo json_encode($response);
}
else if ($db->isUserExisted($phone_number)) {
// user already existed
$response["status"] = FALSE;
$response["error_msg"] = "User already existed with " . $phone_number;
echo json_encode($response);
}
else {
// create a new user
$user = $db->storeUser($username, $email, $country , $phone_number,
$password, $lat, $lon);
if ($user) {
// user stored successfully
$response["status"] = TRUE;
$response["user"]["uid"] = $user["unique_id"];
$response["user"]["username"] = $user["username"];
$response["user"]["email"] = $user["email"];
$response["user"]["country"] = $user["country"];
$response["user"]["phone_number"] = $user["phone_number"];
$response["user"]["country"] = $user["country"];
$response["user"]["height"] = $user["height"];
$response["user"]["weight"] = $user["weight"];
$response["user"]["is_number_verified"] =
$user["is_number_verified"];
$response["user"]["is_safe"] = $user["is_safe"];
$response["user"]["is_login"] = $user["is_login"];
$response["user"]["lat"] = $user["lat"];
$response["user"]["lon"] = $user["lon"];
$response["user"]["created_at"] = $user["created_at"];
echo json_encode($response);
} else {
// user failed to store
$response["Status"] = False;
$response["error_msg"] = "Unknown error occurred in registration!";
echo json_encode($response);
}
}
} else {
$response["Status"] = TRUE;
$response["error_msg"] = "Required parameters are missing!";
echo json_encode($response);
}
?>
DB_Functions.php file
<?php
class DB_Functions {
private $conn;
// constructor
function __construct() {
require_once 'DB_Connect.php';
// connecting to database
$db = new Db_Connect();
$this->conn = $db->connect();
}
// destructor
function __destruct() {
}
/**
* Storing new user
* returns user details
*/
public function storeUser($username, $email, $country, $phone_number,
$password, $lat, $lon) {
$uuid = uniqid('', true);
$height = 0;
$weight = 0;
$is_number_verified = False;
$is_safe = True;
$is_login = False;
$hash = $this->hashSSHA($password);
$encrypted_password = $hash["encrypted"]; // encrypted password
$salt = $hash["salt"]; // salt
$stmt = $this->conn->prepare("INSERT INTO users (unique_id, username,
email, country, phone_number, password, salt, height, weight,
is_number_verified, is_safe, is_login, lat, lon, created_at) VALUES(?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,NOW())");
$stmt->bind_param("ssssssssssssss", $uuid, $username, $email, $country,
$phone_number, $encrypted_password, $salt, $height, $weight,
$is_number_verified, $is_safe, $is_login, $lat, $lon);
$result = $stmt->execute();
$stmt->close();
// check for successful store
if ($result) {
$stmt = $this->conn->prepare("SELECT * FROM users WHERE phone_number
= ?");
$stmt->bind_param("s", $phone_number);
$stmt->execute();
$user = $stmt->get_result()->fetch_assoc();
$stmt->close();
return $user;
} else {
return false;
}
}
}
?>
The URL for testing :
http://pakmanzil.com/zeusonline.me/zeus/register.php?username=bilal&email=bi#gmail.com&country=england&phone_number=03333524145&password=123&lat=0.0&lon=0.0
Change the email and phone_number to make it works please :)