I am creating a mobile application that has a login system, I use javascript (AJAX) to send data (perform queries) to a web server with PHP and that this returns me responses.
I read a post about how to encrypt the data but in the end it was useless because the data could be intercepted anyway and that it was better to have HTTPS.
This is why my web server has HTTPS.
Does this guarantee certain security in the transfer of data between this server and my app?
Yes, of course, HTTPS guarantees encryption between the client (Your application) and the server, so if there is someone who intercepts the message, they will not be able to understand it... It is important that the Server is configured with signed certificates...
That is exactly what HTTPS does, it is the HTTP protocol with SSL security... It is the standard adopted by banks, e-commerce and other entities worldwide to send messages... It is important to note that using only HTTPS does not guarantee that your system is secure, this is just one of the points you must attack in terms of security, which in this case prevents attacks from men in the middle. But there may be other types of attacks apart from the transport layer.