Jump to content

Archived

This topic is now archived and is closed to further replies.

smrpgx

time and $password

Recommended Posts

How do I make it so that every hour, variable $password will change into a random 6-digit number?

Share this post


Link to post
Share on other sites
run this script every hour with a cron job.

[code]
<?php

$newpassword = rand(100000,999999);

$conn = @mysql_connect('host','username','pw') or die(mysql_error());
$db = @mysql_select_db('database',$conn) or die(mysql_error());

$sql = "update tablename set password = '$newpassword' ";
$query = mysql_query($sql, $conn) or die(mysql_error());

mysql_close($conn);

?>
[/code]

Share this post


Link to post
Share on other sites

×

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.