Log in

View Full Version : PHP User Login/Register



Rockonmetal
09-16-2007, 06:56 PM
Hey everyone! I'm probably famous for asking the most demanding and confusing posts and questions ever. *WOHOO!* I think this one will be the top... Anyways:
I want to have a PHP only user login/register script. So that a user can login and upload a file or if they don't have an account they can register and upload a file. Don't worry i have the upload form... but I just need the script so i can do this...
By the way did I mention that I can't use MYSQL... *because my hosting service has the WORST mysql because isn't very friendly and it has a limit to how much data can be transmitted...


THANKS TO ALL THAT HELP
any questions or comments are accepted *and answers*

thetestingsite
09-16-2007, 07:22 PM
Hey everyone! I'm probably famous for asking the most demanding and confusing posts and questions ever. *WOHOO!* I think this one will be the top... Anyways:
I want to have a PHP only user login/register script. So that a user can login and upload a file or if they don't have an account they can register and upload a file. Don't worry i have the upload form... but I just need the script so i can do this...


Didn't you post this question before? I think in your last request like this I pointed you towards http://php-mysql-tutorial.com. That should have everything you need to know about how to accomplish this.



By the way did I mention that I can't use MYSQL... *because my hosting service has the WORST mysql because isn't very friendly and it has a limit to how much data can be transmitted...


Um...what?!? Not friendly, and limit on data transfer? I have never heard of a hosting server doing this. If you need, I can host your MySQL database and give you access through phpmyadmin. Let me know if you want this.

Hope this helps.

Rockonmetal
09-16-2007, 07:34 PM
Um...what?!? Not friendly, and limit on data transfer? I have never heard of a hosting server doing this. If you need, I can host your MySQL database and give you access through phpmyadmin. Let me know if you want this. Hope this helps.
That would make feel really bad man like sorta in the way that I'm using you. I just can't let my self do it... Unless this is a super bad idea which would get me in jail I think i'm sticking to what I'm doing...
Oh BTW my localhost mysql database is not starting thats why i can't plus my hosting service is not so friendly. *i will switch when I get the chance at the end of the contract thingy...*

boogyman
09-17-2007, 12:32 PM
That would make feel really bad man like sorta in the way that I'm using you. I just can't let my self do it...
he is offering you free hosting, and its not illegal. why not take it?



Oh BTW my localhost mysql database is not starting

have you tried doing a remote reboot? most hosting services offer that to clients. and if your server is so bad, why not switch to a new one?

thetestingsite
09-17-2007, 02:39 PM
Oh BTW my localhost mysql database is not starting
have you tried doing a remote reboot? most hosting services offer that to clients. and if your server is so bad, why not switch to a new one?

I believe he is referring to his local machine with a WAMP install. Could be wrong though.

Rockonmetal
09-17-2007, 08:10 PM
he is offering you free hosting, and its not illegal. why not take it?

Me and new things often break first time, maybe later if I'm having problems but not now because I could end up hurting his site or something like that that... *trust me I can do it without even meaning to do it...*

djr33
05-13-2010, 06:20 PM
This is one of the most basic things you can do with MySQL. Alternatively you can use flat files-- .txt files, for example.

Create a folder called "accounts" and inside it store username.txt for each user. Inside that, store the password and any other info you need in an easily accessible format, like CSV, etc.
[Make sure that the username is a valid filename!!!-- strip out any weird characters, make it required to be lowercase, etc.]

file_get_contents() and fopen(), fwrite(), and fclose() should be most of what you need for this.

Look up some tutorials on google (there are lots).

You won't find any really basic user account scripts, though you'll find a lot embedded in other things (like forums), though you have no need for something that complex.

Aside from writing it for you, the best help we can give you is to point you to a tutorial.
http://php-mysql-tutorial.com has a specific tutorial (as I remember) of doing user logins/accounts.
If you don't want to use mysql, use what I said above for flat files, and you may still get some insight from that tutorial on how to deal with the php parts.

Beverleyh
05-17-2010, 09:13 AM
This script might be useful to you: http://www.myphpscripts.net/?sid=7