| | |
how to make member expire after so many days with php script
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
How much PHP do you know? You could just calculate the time length between the last login and registration time (if they've never logged in yet), or between the last two logins. If it equals x amount of time, then delete'em. How complicated is your current script? I could probably help you more if you give me more info on how much you know and what kind of script you're working with.
Check out my blog at http://www.shinylight.com for more stuff about web dev.
Use cookies for your login script. Set it for an expiring time for each user. Or simply use seesions if your good with PHP. Run the sessions from a MySQL Databse too, thatll help you keep track for sure how long they stay logged in or not.
dynastyCODERS#1 when it comes to Programming Tutorials, Database designs and discussions, Operating Systems, you name it, check us out and drop us a line to tell us your opinions on any and everything in mind!;)
•
•
Join Date: Dec 2004
Posts: 5
Reputation:
Solved Threads: 0
I don't know much at all! I'm using a free script. (Jpmaster77's Login Script)
What I need is to auto delete users and passwords from Mysql database after
a certain number of days. I can't find a free script that will do that.
I read that I could write a php script that will do this.....(by using cron to execute
it), but I don't know much about cron either. :o
What I need is to auto delete users and passwords from Mysql database after
a certain number of days. I can't find a free script that will do that.
I read that I could write a php script that will do this.....(by using cron to execute
it), but I don't know much about cron either. :o
WEll, I hope my tutorial wll help you, by for now, its at my latest test site if you want to go look and read up on it, it might help you as far as Kill Cookies go or even sessions so that you wont have t odo it manually from the Database. http://www.mtechhosting.com/site/mod...iewItems&vid=1
No registration as I said already that this is my test site.
No registration as I said already that this is my test site.
dynastyCODERS#1 when it comes to Programming Tutorials, Database designs and discussions, Operating Systems, you name it, check us out and drop us a line to tell us your opinions on any and everything in mind!;)
•
•
Join Date: Dec 2004
Posts: 9
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by mvblhp
I already have have a members login script.... but i have to manually delete users.....what i reaaly need is to know how to make member expire after so many days with a php script. (free or very cheap) :cheesy:
aldo
1 word. Sessions!!
dynastyCODERS#1 when it comes to Programming Tutorials, Database designs and discussions, Operating Systems, you name it, check us out and drop us a line to tell us your opinions on any and everything in mind!;)
You could of course use sessions to maintain a users logged in period, but the deleting will need to be handled by a cron executed periodic script.
To do this you would simply need to add a tmie stamp to each users database entry stating when they last logged in.
The cron'd script would then run a database query regularly, (say daily or weekly or whatever you need) which would check each users timestamp, compare it to the current time, and if it exceeds your x amount of time, delete the database row (all users details).
Please read the following documentation for a thorough and clear tutorial on using crons http://www.webmasters-central.com/t/cron.shtml
Hope this helps
To do this you would simply need to add a tmie stamp to each users database entry stating when they last logged in.
The cron'd script would then run a database query regularly, (say daily or weekly or whatever you need) which would check each users timestamp, compare it to the current time, and if it exceeds your x amount of time, delete the database row (all users details).
Please read the following documentation for a thorough and clear tutorial on using crons http://www.webmasters-central.com/t/cron.shtml
Hope this helps
I'm pink, therefore, im spam.
http://www.vivaci.net - Quality Webhosting
http://gaming.vivaci.net - FAST UK Gaming servers
http://www.getsigned.org - Free Image Uploads
http://www.vivaci.net - Quality Webhosting
http://gaming.vivaci.net - FAST UK Gaming servers
http://www.getsigned.org - Free Image Uploads
![]() |
Similar Threads
- question about connecting odbc to sql through php script (PHP)
- I want to make free subscription area (PHP)
Other Threads in the PHP Forum
- Previous Thread: PHP Forums Warning: New Strain Santy Worm Attacks
- Next Thread: How can i call c++ functions in php?
| Thread Tools | Search this Thread |
.htaccess ajax apache api array back basic beginner binary broken cakephp checkbox class cms code computing cron curl customizableitems database date delete display dynamic echo email error file files filter folder form forms function functions gc_maxlifetime google host href htaccess html image include insert integration ip java javascript joomla limit link login loop mail memmory memory menu mlm mod_rewrite multiple mysql navigation oop parsing paypal pdf php problem query radio random recursion regex remote script search server sessions sms snippet soap source space sql syntax system table thesishelp trouble tutorial update upload url validation validator variable video web xml youtube






