Welcome to Dream.In.Code
Become a PHP Expert!

Join 136,930 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,838 people online right now. Registration is fast and FREE... Join Now!




Flash Uploader

 
Reply to this topicStart new topic

Flash Uploader, Help me please!

x360c
9 Mar, 2008 - 12:36 PM
Post #1

New D.I.C Head
*

Joined: 9 Mar, 2008
Posts: 1

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!");

?>

User is offlineProfile CardPM
+Quote Post

ahmad_511
RE: Flash Uploader
9 Mar, 2008 - 03:06 PM
Post #2

D.I.C Regular
Group Icon

Joined: 28 Apr, 2007
Posts: 351



Thanked: 8 times
Dream Kudos: 400
My Contributions
Hello
I think you must remove the single quotes you added to the column's names and the table
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/3/08 10:33PM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month