$v){ $user[$k] = $v; } return $user; } /* this function returns an array with the user's information from Jobseeker Table OR Employers Table returns false if something is wrong or Array otherwise */ function fetch_user_advanced($unique_id = '') { global $conn_id; if( empty($conn_id) ) { $conn_id = db_connect(); // this function, db_connect() is defined in 'include/functions.php'; } $user = array(); if(empty($unique_id)) { return false; $sql = "SELECT * FROM pm_users WHERE id= '".$unique_id."'"; } $result = @mysql_query($sql, $conn_id); if( !result ) return false; $count = @mysql_num_rows($result); if( !$count ) return false; $row = @mysql_fetch_assoc($result); @mysql_free_result($result); foreach($row as $k => $v){ $user[$k] = $v; } return $user; } function generate_unique_id(){ return substr(md5(uniqid(time(), true)), 0, 7); } ?>