From what I understand, you shouldn't connect through Unity3D because people could then get hold of your DB credentials.
Here's some information on how to do it more safely:
http://wiki.unity3d.com/index.php?title=Server_Side_Highscores
Unordered lists have a top and bottom margin of 1em by default.
Elements within the flow of a same formatting context have collapsing margins.
To prevent this, you could give your header (the big blue one) a bottom border of 1px in the same color as your page background and remove the 1px...
XHRs are subject to the Same Origin-policy.
Unless you enabled Cross-Origin Resource Sharing on the remote host, it's only natural you're not receiving any data.
First of all: the book I referred to is considered to be the JavaScript bible by many professionals.
Secondly: Not everything in JavaScript is an object.
Just because you can call a method on an integer (for example), doesn't mean it's an object.
All it means is that ECMAScript is smart enough...
Seems short circuiting is less lenient in PHP than in JavaScript.
What I said about operator precedence remains true though:
Because the '=' operator precedes 'or', you could still get nasty "bugs".
A sidenote that may be interesting in this thread: Assignments in PHP "return" the truthy or...
This is false. JavaScript (or ECMAScript) has Primitive Types and Reference Types.
As for private properties or methods: they are supported in ECMAScript 5 but, for now, all you can do is simulate them.
The reason I say simulate, is because the private/protected/public bits get complicated as...
If you're going to use 'or' like that, you may as well stick to your original if-statements..
If you want to use short-circuiting, the only sane way to do it is using '||'
|| has higher precedence than 'or' and is easily interchangeable with binary operators such as 'binary or' (|).
Edit: using a literal 'or' will actually result in failures, seeing as '=' has higher precedence than 'or', but not '||'.
That would, as GTU said, cause notices if the array key doesn't exist.
You could, however, suppress those notices and use the code below.
$ip = @$_SERVER['HTTP_CLIENT_IP'] || @$_SERVER['HTTP_X_FORWARDED_FOR'] || @$_SERVER['REMOTE_ADDR'];
For more info, see...
Notepad++ for local/FTP development
VIM on Linux boxes that have no FTP or for editing/viewing other files such as httpd.conf, logs, ...
For NPP, I use the ZenCoding and Explorer plug-ins
Edit: My 1000th post :o