I'm creating a login. What I need is help doing this.
Well, I'm wondering how to read a file. Like, /log.txt, if it says "lentin64" and it's password it redirects. How do I do that?
from the manual: // get contents of a file into a string $filename = "/usr/local/something.txt"; $fd = fopen ($filename, "r"); $contents = fread ($fd, filesize ($filename)); fclose ($fd);
you can find that here: http://www.php.net/manual/en/function.fread.php
you can then test $contents for whatever you want to.
or you can just use a pre-built login library like php_lib_login, found here: http://freshmeat.net/projects/php_lib_login/
What about a all-in-one file (means a short code in 1 file) short code?
i don't get what you mean. can you be more specific?