H4cKL0rD Posted May 30, 2009 Share Posted May 30, 2009 is there a way to implicate user authenication without mysql ive been looking for months and i cannot do it . if so IM at [email protected] or [email protected] Link to comment https://forums.phpfreaks.com/topic/160237-php-user-authenication-without-sql/ Share on other sites More sharing options...
Ken2k7 Posted May 30, 2009 Share Posted May 30, 2009 Use flat file? Link to comment https://forums.phpfreaks.com/topic/160237-php-user-authenication-without-sql/#findComment-845529 Share on other sites More sharing options...
H4cKL0rD Posted May 30, 2009 Author Share Posted May 30, 2009 Im new to php and do not know how to do this kinda stuff ???Now what?? Link to comment https://forums.phpfreaks.com/topic/160237-php-user-authenication-without-sql/#findComment-845531 Share on other sites More sharing options...
Ken2k7 Posted May 30, 2009 Share Posted May 30, 2009 Then now is as good a time as any to learn it, right? Link to comment https://forums.phpfreaks.com/topic/160237-php-user-authenication-without-sql/#findComment-845533 Share on other sites More sharing options...
H4cKL0rD Posted May 30, 2009 Author Share Posted May 30, 2009 Ok but isnt this supposed to be help forum ? Link to comment https://forums.phpfreaks.com/topic/160237-php-user-authenication-without-sql/#findComment-845535 Share on other sites More sharing options...
roopurt18 Posted May 30, 2009 Share Posted May 30, 2009 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 https://forums.phpfreaks.com/topic/160237-php-user-authenication-without-sql/#findComment-845540 Share on other sites More sharing options...
H4cKL0rD Posted May 30, 2009 Author Share Posted May 30, 2009 Well I've tried to do this but do not know how to make this code i get wht i am supposed to do but do not know how to do it. Link to comment https://forums.phpfreaks.com/topic/160237-php-user-authenication-without-sql/#findComment-845544 Share on other sites More sharing options...
trq Posted May 30, 2009 Share Posted May 30, 2009 Post your problematic code then, were not going to write it for you. Link to comment https://forums.phpfreaks.com/topic/160237-php-user-authenication-without-sql/#findComment-845545 Share on other sites More sharing options...
DarkSuperHero Posted May 30, 2009 Share Posted May 30, 2009 ....Well I've tried to do this ........ Maybe post your attempt here ? Read up on fopen(), fread(), fclose(); or file()/file_get_contents() on php.net and hopefully you know the basics on arrays and variables... :-) right ? Link to comment https://forums.phpfreaks.com/topic/160237-php-user-authenication-without-sql/#findComment-845546 Share on other sites More sharing options...
.josh Posted May 30, 2009 Share Posted May 30, 2009 maybe he's having trouble understanding the manual since its not in leetspeak. Link to comment https://forums.phpfreaks.com/topic/160237-php-user-authenication-without-sql/#findComment-845548 Share on other sites More sharing options...
Garethp Posted May 30, 2009 Share Posted May 30, 2009 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 https://forums.phpfreaks.com/topic/160237-php-user-authenication-without-sql/#findComment-845549 Share on other sites More sharing options...
H4cKL0rD Posted May 30, 2009 Author Share Posted May 30, 2009 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 https://forums.phpfreaks.com/topic/160237-php-user-authenication-without-sql/#findComment-845550 Share on other sites More sharing options...
Ken2k7 Posted May 30, 2009 Share Posted May 30, 2009 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 https://forums.phpfreaks.com/topic/160237-php-user-authenication-without-sql/#findComment-845552 Share on other sites More sharing options...
trq Posted May 30, 2009 Share Posted May 30, 2009 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 https://forums.phpfreaks.com/topic/160237-php-user-authenication-without-sql/#findComment-845553 Share on other sites More sharing options...
Recommended Posts