This project offers a simple and secure user registration, login, and logout system using PHP and MySQL. The system utilizes PHP's session structure for managing user sessions. All operations are handled within a single file, index.php
. 💻🔐
- User Registration: Allows users to register to the system.
- Login: Enables registered users to securely log in to the system.
- Logout: Allows logged-in users to securely log out of the system.
- Session Management: Utilizes PHP session structure for managing user sessions.
The following options are presented to the user when not logged in:
The page where users can register to the system:
The page where registered users can log in:
The options presented to the user when logged in:
Follow the steps below to set up and run this project in your environment:
- PHP 7.x or higher 🐘
- MySQL 5.x or higher 🗄️
- Apache or Nginx web server 🌐
First, clone the project to your local environment:
git clone https://github.com/enesbabekoglu/PHP-MySQL-Login-Register-Logout.git
cd PHP-MySQL-Login-Register-Logout
Create the necessary tables in your MySQL database by importing the enesbabekoglu_lab.sql
file:
mysql -u username -p database_name < enesbabekoglu_lab.sql
Edit the following line in the index.php
file to match your own database connection details:
$mysqli = mysqli_connect("localhost", "enesbabekoglu_lab", "_M15vx7e3", "enesbabekoglu_lab");
In this line:
"localhost"
: Your database server's address,"enesbabekoglu_lab"
: Your database username,"_M15vx7e3"
: Your database password,"enesbabekoglu_lab"
: Your database name
should be updated with your own information.
Upload the project to your web server and run it in your browser:
http://localhost/PHP-MySQL-Login-Register-Logout/index.php
You can now perform user registration, login, and logout operations on your system. 🎉
This project is licensed under the MIT License. For more information, please refer to the LICENSE
file.
If you'd like to contribute to this project, please submit a pull request or open an issue. Your feedback and contributions are welcome!
Bu proje, PHP ve MySQL kullanılarak basit ve güvenli bir kullanıcı kayıt, giriş ve çıkış sistemi sunar. Sistem, kullanıcı oturumları için PHP'nin session yapısını kullanır. Tüm işlemler tek bir dosya olan index.php
içinde gerçekleştirilir. 💻🔐
- Kullanıcı Kaydı: Kullanıcıların sisteme kayıt olmasını sağlar.
- Giriş Yapma: Kayıtlı kullanıcıların sisteme güvenli bir şekilde giriş yapmasını sağlar.
- Çıkış Yapma: Giriş yapan kullanıcıların oturumlarını güvenli bir şekilde kapatmasını sağlar.
- Session Yönetimi: PHP session yapısı kullanılarak oturum yönetimi sağlanır.
Üye girişi yapılmadığında aşağıdaki seçenekler kullanıcıya sunulur:
Kullanıcıların sisteme kayıt olabileceği sayfa:
Kayıtlı kullanıcıların sisteme giriş yapabileceği sayfa:
Üye girişi yapıldığında kullanıcıya sunulan seçenekler:
Bu projeyi kendi ortamınıza kurmak ve çalıştırmak için aşağıdaki adımları izleyin:
- PHP 7.x veya üstü 🐘
- MySQL 5.x veya üstü 🗄️
- Apache veya Nginx gibi bir web sunucusu 🌐
Öncelikle, projeyi yerel ortamınıza klonlayın:
git clone https://github.com/enesbabekoglu/PHP-MySQL-Login-Register-Logout.git
cd PHP-MySQL-Login-Register-Logout
MySQL veritabanınızda gerekli tabloları oluşturun. enesbabekoglu_lab.sql
dosyasını MySQL veritabanınıza aktararak tabloları oluşturabilirsiniz:
mysql -u kullanıcı_adı -p veritabanı_adı < enesbabekoglu_lab.sql
index.php
dosyasında yer alan aşağıdaki satırı, kendi veritabanı bağlantı bilgilerinize göre düzenleyin:
$mysqli = mysqli_connect("localhost", "enesbabekoglu_lab", "_M15vx7e3", "enesbabekoglu_lab");
Bu satırda:
"localhost"
: Veritabanı sunucunuzun adresi,"enesbabekoglu_lab"
: Veritabanı kullanıcı adınız,"_M15vx7e3"
: Veritabanı şifreniz,"enesbabekoglu_lab"
: Veritabanı adınız
olacak şekilde kendi bilgilerinizle güncelleme yapmalısınız.
Projeyi web sunucunuza yükleyin ve tarayıcınızda çalıştırın:
http://localhost/PHP-MySQL-Login-Register-Logout/index.php
Artık sisteminizde kullanıcı kayıt, giriş ve çıkış işlemlerini yapabilirsiniz. 🎉
Bu proje MIT Lisansı ile lisanslanmıştır. Daha fazla bilgi için LICENSE
dosyasına bakabilirsiniz.
Bu projeye katkıda bulunmak isterseniz, lütfen bir pull request gönderin veya bir issue açın. Geri bildirimleriniz ve katkılarınız memnuniyetle karşılanacaktır!