Well, I am working on school project and I am doing social site. First I made my whole web-sites in HTML, CSS and JS. (including login and register section) Then I started to learn PHP and it looks like the PHP file is the separate website :/ (I don't know)

So the thing I want, is to have open my main page(html) and by some JS code, load or upload data from database(MySQL-phpMyAdmin) without opening another page(php file). Is it possible? I mean, I want the PHP codes to work like JS codes, in the background and don't open any window.

Sorry for the English