<?php
$dbh = new PDO("mysql:host=localhost;dbname=mmaaaco_cjorgensen", "mmaaaco_cjorgen", "TD}*;vhNWkT$");
$page = basename($_SERVER['PHP_SELF']);
$uid = $_SESSION['id'];
$upsql = $dbh->prepare("update users set lastaction = now(),currpage = ? where id = ?");
$upsql->execute(array($page,$uid)); 

function makepass() {
$salt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
srand((double)microtime()* 1000000);
$i=0;
while($i<7)
    {
 $num = rand() % 33;
 $tmp = substr($salt,$num,1);
 $pass = $pass.$tmp;
 $i++;
	}
return $pass;
}

?>