Jump to content

PHP User authenication without sql?


H4cKL0rD

Recommended Posts

We provide guidance and assistance with things you've tried that didn't work.  You asked how to perform authentication without a database and ken suggested a flat file.  It's up to you to learn about PHP's file handling mechanisms, write some code, and then come back for help when your code doesn't work.

Link to comment
Share on other sites

The most secure way to do this (That I can think of) is to have your registration script open up a PHP script called Data.php (Or something of the sorts) with code like this

 

<?php

$Users['Username'] = "Password";

?>

 

and add to that array using reading and writing if the user doesn't exist, then the login would include "Data.php" and authenticate like that

Link to comment
Share on other sites

Well i have a C++ code that is what I want, It stored the Username and password and other data and finds the certain line by finding an ID like finding the word H4cKL0rD then checking the word next to it which would be the password but i do not know how to do this in php

Link to comment
Share on other sites

Try to convert it the best you can. The post up the code. We can walk you through then. But like thorpe said, this forum isn't for requests. If you want someone to write it for you (it'll probably cost you some money), you can post asking a mod to move this topic to Freelance.

 

PHP syntax isn't much different. You define functions the same way, except you don't specify the return type. Like in C++, you would say - int func (param) - whereas in PHP, you would just do - function func (param). PHP also doesn't have variable types like in C++ - int x = 4 in PHP would be $x = 4. Just read up on basic PHP and you'll convert it easily. Again, if you run into a line where you get errors, you can ask for help here.

Link to comment
Share on other sites

You are kidding?

 

PHP sytax is similar to C++, you shouldn't have an issue. As I said, were not here to write code for people, so your going to need to attempt something.

 

Start by taking a look at fopen, fread and go from there.

 

I'm closing this thread because it is going nowhere.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.