So unfortunately there's three different "roots". Which one someone means depends on context.
1. When it comes to files and directories in Linux, / is the root. Not "home" - that's where your personal files are, and is typically /home/something.
2. When it comes to figuring out where stuff is when you're dealing with PHP code, the "root" means the place where your web server starts holding files. That would be /opt/lampp/htdocs.
3a*. When it comes to URLs and other things you see when you're browsing a website, the root is also / according to what's in your browser's address bar. Not including the http(s) or domain name but the first slash right after.
The second and third are closely related: the root of where your web server is hosting files is /opt/lampp/htdocs and that is the same as / in the address bar. Unless you tell your server differently, if you go to http://localhost/MyProject/uploads/whatever.ext then the web server is going to look for the web root (/opt/lampp/htdocs) + the path portion of the URL (/MyProject/uploads/whatever.ext) and try to find a file named /opt/lampp/htdocs/MyProject/uploads/whatever.ext.
What ginerjm is talking about is the second one, and whose value you can get in PHP with $_SERVER["DOCUMENT_ROOT"]. You do not set that value yourself. PHP gives it to you for free.
If you want to take a file upload and always place it in the root of your web site + /MyProject/uploads/ then you need the DOCUMENT_ROOT plus that path part (and probably plus a file name itself).
$fileDestination = $_SERVER["DOCUMENT_ROOT"] . "/MyProject/uploads/" . $fileNameNew;
Now here you've got a slight problem: that /MyProject piece. That's not going to be there in the real site, but you have it in your setup.
You have two basic choices for how to deal with that:
1. Tell your web server to host files out of MyProject. That requires going into the server configuration and changing some values. There's a right way and a wrong way of doing this, so rather than deal with that, just ignore this option.
2. Put all your MyProject files into the htdocs directory. This is really easy. The downside is that you can't have multiple websites anymore because http://localhost is always going to be what's in /opt/lampp/htdocs and that's always going to be the "MyProject" stuff.
Once you've moved the files you can get rid of the "MyProject" stuff in your code and your local site will be one step closer to working like the real site will.
$fileDestination = $_SERVER["DOCUMENT_ROOT"] . "/uploads/" . $fileNameNew;
* There's a 3b option where you might say "well no, I consider the root of my site to be http://localhost/MyProject". Saying things like that is an easy way to get everybody confused so stick with 1, 2, and 3a.