I can't access functions from 'getuser.function.php' or cookies. I am running this code through the reference function in flash. I can't get it to access those variables from mysql either. Help!
CODE
<?
require_once('functions/config.function.php');
require_once('functions/getuser.function.php');
$zidiansessionid = $_COOKIE['zidiansessionid'];
$file_ext = substr($_FILES['Filedata']['name'], strrpos($_FILES['Filedata']['name'], '.') + 1);
$file_path = './avatars/'.$_COOKIE['zidiansessionid'].'.'.$file_ext;
move_uploaded_file($_FILES['Filedata']['tmp_name'],$file_path);
$updateAvatarFormatQuery = "UPDATE `members` SET `avatarformat`='".mysql_real_escape_string($file_ext)."' WHERE `sessionid`='".mysql_real_escape_string($_COOKIE['zidiansessionid'])."'";
mysql_query($updateAvatarFormatQuery) or die("Unable to process avatar update!");
?>