百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
L

LogIn-SignUp

> 数据库
开源

一个安全的 PHP API,用于管理登录和注册操作。此 API 可防止 SQL 注入和 XSS 等攻击。为开发人员提供更轻松的开发体验

100 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

一个安全的 PHP API,用于管理登录和注册操作。此 API 可防止 SQL 注入和 XSS 等攻击。为开发人员提供更轻松的开发体验

Secure LogIn and SignUp API in PHP

A secure PHP API to manage login and signup operations. This API protects from attacks like SQL injunction and XSS. Making development work easier for developers.

How to use?

First of all download the files DataBase.php and DataBaseConfig.php. Place it in your project folder. Go to the DataBaseConfig.php file and change the details to your database details.Now add the file DataBase.php to your project file by requiring it.

require "DataBase.php";

Simply create an object for the class DataBase.

$db = new DataBase();

Call the dbConnect() and it will return a boolean value which shows whether the database connection is success of not.

$db->dbConnect();

Inside the current file check the condition for database connection. If it is true proceed with the rest. Check this sample code.

require "DataBase.php";
$db = new DataBase();
if ($db->dbConnect()) {
    //Database connection is success.
}
else{
    //Database connection is failed.
}

Now that the connection is success you can call the login and the signup functions. Use the object of the class DataBase and call the functions.

Calling Login Function

Call the logIn() with the object and pass the tablename, username and password as its arguments.

$db->logIn($tablename, $username, $password);

Calling Signup Function

Call the signUp() with the object and pass tablename, fullname, username, password and email as its arguments. You can also chnage the number of arguments as you want, but you will have to change signUp() in the DataBase class accordingly.

$db->signUp($tablename, $fullname, $username, $password, $email);

Feel free to report any issues related to this.

Authors

  • Vishnu Sivadas - Developer - Website

Check out my other works @VishnuSivadasVS

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

PHPlogin-apiphp-apiphp-authenticationphp-login

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类数据库
定价开源

> 相关工具

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库