I'm having a hard time grasping how PHP/HTML/the server works and I couldn't find any info (it has to be somewhere so if you have a link I'd appreciate it). I'll try to explain best what I understand/don't understand and ask a concise question.
My Understanding
- PHP code is in the same file as HTML files and needs the server to have a PHP parser? to read and execute the PHP code.
- PHP code executes first on the server side, then HTML/JS execute on the client side (hence you can't see the PHP code on the browser).
What I don't understand
- When a PHP code calls a $_POST request, where is the request going? Let's say I call a $_POST request to mypage2.php. How do I handle this $_POST request in my mypage2.php code? (I setup an iFrame and tried to make a $_POST request to it, but it changed to that page).
- How do I use multiple .php files on a site? I always see something like authentication.php but are those pages just classes to never be used (aka I can never go to mysite.com/authentication.php)?
- My end goal is to get data from an external $_POST call, and send it to my page embedded in an iFrame. I feel I don't understand the basic concepts first though and all the tutorials discuss the syntax of PHP (which I think I understand).
I am running on a windows machine and using XAMPP if that is relevant. Thank you.