**LAMP** (**L**inux, **A**pache, **M**ySQL, **P**HP/**P**erl/**P**ython) is an [acronym](https://en.wikipedia.org/wiki/Acronym) denoting one of the most common [solution stacks](https://en.wikipedia.org/wiki/Solution_stack) for many of the web's most popular [applications](https://en.wikipedia.org/wiki/Web_application). However, LAMP now refers to a generic software stack model and its components are largely interchangeable.[1](https://en.wikipedia.org/wiki/LAMP_(software_bundle)#cite_note-1) Each letter in the acronym stands for one of its four [open-source](https://en.wikipedia.org/wiki/Open-source_software) building blocks: * **[L](https://en.wikipedia.org/wiki/Linux)**[inux](https://en.wikipedia.org/wiki/Linux) for the [operating system](https://en.wikipedia.org/wiki/Operating_system) * **[A](https://en.wikipedia.org/wiki/Apache_HTTP_Server)**[pache HTTP Server](https://en.wikipedia.org/wiki/Apache_HTTP_Server) * **[M](https://en.wikipedia.org/wiki/MySQL)**[ySQL](https://en.wikipedia.org/wiki/MySQL) for the [relational database management system](https://en.wikipedia.org/wiki/Relational_database_management_system) * **[P](https://en.wikipedia.org/wiki/PHP)**[HP](https://en.wikipedia.org/wiki/PHP), [Perl](https://en.wikipedia.org/wiki/Perl), or [Python](https://en.wikipedia.org/wiki/Python_(programming_language)) [programming language](https://en.wikipedia.org/wiki/Programming_language) **XAMPP** is a [free and open-source](https://en.wikipedia.org/wiki/Free_and_open-source) [cross-platform](https://en.wikipedia.org/wiki/Cross-platform) [web server](https://en.wikipedia.org/wiki/Web_server) [solution stack](https://en.wikipedia.org/wiki/Solution_stack) package developed by Apache Friends. The X is a place holder for Windows/MacOs/Linux. # Apache All web pages are stored in the htdocs folder of your xampp folder.  You can store websites in separate folders of the htdocs folder. (In fact, you will see an xampp site there already).  You view webpages by navigating to <http://localhost/webPageName> ## A Simple HTML Webpage Copy the following text into notepad and save the file as **example.html**.  Copy the file into the **htdocs** folder of your **xampp folder** ```html <html> <h1> Example HTML Web Page!</h1> <p> Welcome to my example HTML Web Page </p> </html> ``` Open your web browser and navigate to <http://localhost/example.html> ## A Simple PHP Webpage This is not a PHP course.  w3schools provide an excellent tutorial in PHP if you're interested: <http://www.w3schools.com/PHP/DEfaULT.asP> Copy the following text into notepad and save the file as **example.php (Note the new extension!).**  Copy the file into the **htdocs** folder of your **xampp folder.** Browse to <http://localhost/example.php> ```php <html> <body> <?php $d=date("D"); if ($d=="Fri")      echo "Have a nice weekend!"; else     echo "Have a nice day!"; ?> </body> </html> ``` # Using PHP to interrogate a Database ```php <?php $h = "localhost"; $u = "root"; $p = ""; $connection = mysql_connect($h,$u,$p); if (!$connection) { die("Could not connect to the database"); } mysql_select_db("seeds"); $query = "SELECT * FROM tblseeds"; $result = mysql_query($query); echo "<table> <tr> <th>Name</th><th>Type</th><th>Seed</th><th>Price</th> </tr>"; while ($row = mysql_fetch_array($result)) { extract($row); echo "<tr><td>".$name."</td><td>".$type."</td><td>".$seed."</td><td>".$price."</td> </tr>"; } echo "</tr> </table>"; mysql_close($connection); ?> ```