+
-> In this project you will learn how to explore the content of the variable $_SERVER which is injected to the running script, in it we can find information about the server environment and the client.
+# PHP Server Environment
-## Index
+> In this project I learned how to do a login page with authentication and a private page for logged users.
-- [Requirements](#requirements)
-- [Repository](#repository)
-- [Technologies used](#technologies-used)
-- [Project delivery](#project-delivery)
-- [Resources](#resources)
+All the exercises have been done using PHP as language and using Xampp as web server.
+
+## What I've learned
-## Requirements
+
-- Learn how to use the $_SERVER
-- Understand what a server-side language is and what it is used for
+- Learn how to do a basic login page with PHP.
-## Repository
+- What is a global variable.
-First of all you must fork this project into your GitHub account.
+- How to use the sessions in PHP.
-To create a fork on GitHub is as easy as clicking the “fork” button on the repository page.
+- How to store data that are entered by the user.
-
+
## Technologies used
-\* PHP
-
-## Project delivery
+
-To deliver this project you must send a Pull Request as explained in the Students Handbook. Remember that the PR title must be with the format
-- Solution: + NAME AND SURNAME or TEAM NAMES AND SURNAMES.
-- For example: "Solution: Josep Riera", "Solution: Josep Riera, Toni Suárez, Marta Vázquez"
+\* PHP
-## Resources
+\* CSS
-- [$_SERVER](https://www.php.net/manual/en/reserved.variables.server.php)
-- [PHP.ini](https://www.php.net/manual/es/configuration.file.php)
-- [PHP Superglobals](https://code.tutsplus.com/es/tutorials/php-superglobals-explained-with-cheatsheet--cms-36598)
+## Autor
+* **[David Moina](https://github.com/davidmoina)**
\ No newline at end of file
diff --git a/close_session.php b/close_session.php
new file mode 100644
index 0000000..b7dc70f
--- /dev/null
+++ b/close_session.php
@@ -0,0 +1,12 @@
+
\ No newline at end of file
diff --git a/exercises/phpinfo.php b/exercises/phpinfo.php
new file mode 100644
index 0000000..640e4f2
--- /dev/null
+++ b/exercises/phpinfo.php
@@ -0,0 +1,3 @@
+
\ No newline at end of file
diff --git a/exercises/server_variables.php b/exercises/server_variables.php
new file mode 100644
index 0000000..599d9f8
--- /dev/null
+++ b/exercises/server_variables.php
@@ -0,0 +1,5 @@
+";
+ print_r($_SERVER);
+ echo "";
+?>
\ No newline at end of file
diff --git a/exercises/session_variables.php b/exercises/session_variables.php
new file mode 100644
index 0000000..5be127d
--- /dev/null
+++ b/exercises/session_variables.php
@@ -0,0 +1,10 @@
+';
+ print_r($_SESSION);
+ echo '';
+?>
\ No newline at end of file
diff --git a/images/profile.jpg b/images/profile.jpg
new file mode 100644
index 0000000..6d14861
Binary files /dev/null and b/images/profile.jpg differ
diff --git a/images/profile2.jpg b/images/profile2.jpg
new file mode 100644
index 0000000..65b3635
Binary files /dev/null and b/images/profile2.jpg differ
diff --git a/index.php b/index.php
new file mode 100644
index 0000000..af18074
--- /dev/null
+++ b/index.php
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+ Login
+
+
+
+
+ Username or password wrong.";
+ } else {
+ echo "
Please login first
";
+ }
+ }
+ ?>
+
+
+
\ No newline at end of file
diff --git a/panel.php b/panel.php
new file mode 100644
index 0000000..609baea
--- /dev/null
+++ b/panel.php
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+ Profile
+
+
+
+