I have some php files that freely run on my online PHP,MySQL server. As an example if it concern about addUser.php (here is that code)
<?php
if($_SERVER['REQUEST_METHOD']=='POST'){
$name = $_POST['name'];
$email = $_POST['email'];
...
$sql = "INSERT INTO users (name,email,...) VALUES ('$name','$email',...)";
require_once('DbConnect.php');
if(mysqli_query($con,$sql)){
echo 'User Added Successfully';
}else{
echo 'Could Not Add User';
}
mysqli_close($con);
}
I have coded my ANDROID Application to access this type of php file by StringRequest using URL
http://www.***.com/addUser.php
and pass the parameters using HashMaps
So, I want to know how is this php file runs when android user access it, and what will occur when thousands of android users started accessing this php file and started to insert data into my online server Database concurrently. And if there is a problem occur what is the solution for it?
I just want to know is it a problem occur when many users try the same php file at same time?? I mean we use synchronizing in multi-threading to prevent occuring a problem when many users use the same at sametime. As in that way is there will a problem occur when thousands of users adding data through this php file