File upload script not working

I've created a file upload script, and it doesn't seem to be working. Here's my code. I'm wondering if there's something that has to do with ehcp. I asked a couple of php guys and they don't know so it might be php settings. I saw something when I searched, but I still don't understand it. Here's the code. 0) { die("Error uploading file! Code $error."); }else{ move_uploaded_file($temp,"/center/resources/books/".$filename); mysql_query($sql); } } ?>
Book Name
File

I figured the upper code didnt work, so here's an image.
http://img526.imageshack.us/i/screenshot20110218at413.png/

I use EHCP =)

Your solution didn't help. I still receive that error.

I use EHCP =)

Where is the code running at? ie in a domain folder? where are you trying to upload the file to?

in the image... I'm trying to upload it from admin to /center/resources/books where /center is a directory right off of the root directory

I use EHCP =)

Ok let me try to explain that better.

this code u have in the pic is in a file called lets say, upload.php. Where is that file located? is it in a domain--

test.com/upload.php =

var/www/vhosts/test/test.com/httpdocs/upload.php?

and the dir your copying to, wheres its path?

var/www/vhosts/test/test.com/httpdocs/center/resources/books

thats just an example of what im looking for. If your trying to put the file somewhere on the server not in a web dir, esp under the same domain as that the script is in, you will have issues.

its located in /center/admin/addresource.php

I use EHCP =)