Problems with the Windows version of XAMPP, questions, comments, and anything related.


Postby sabby76 » 22. February 2011 23:45

Just sarted with XAMMP and now I can test a user login and registration .php page locally.
I wondered is Apache responsible for connecting the MySQL database to the login.php page through Dreamweavers connections .php file?
Thanks for reading
Posts: 12
Joined: 16. June 2010 01:50


Postby glitzi85 » 05. March 2011 00:26

I do not fully understand what you write, but that's how it works:

When you request a website to Apache with your Browser, Apache tries to load that file from the hard disk. It recognizes that it is a PHP file and sends the file to the PHP parser. The output of the parser is then sent back to the browser. That's it from the Apache point of view. Everything that is written in PHP inside of your php files is executed by the php parser, including connections to databases.
You can compare this with ordering an burger:
You walk into a store and order an burger (Request from Browser to Apache)
The guy at the desk is checking if there is already a burger ready (Apache delivering static files like images or html files)
or he needs to get a new one. In this case he passes your Order to the cook (Apache requests PHP to parse the php file)
The cook does not have everything, so he asks his helper to cut the salad (PHP request data from a database)
The helper gives the salad to the cook, which puts it onto the burger (PHP get's data from database)
The cook is giving your burger to the guy at the desk (PHP passes it's output to Apache)
You get your burger (Apache delivers the output to the Browser)

User avatar
Posts: 1920
Joined: 05. March 2004 23:26
Location: Dahoim

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 50 guests