Can someone please explain this to me:
$uid = isset($_POST['uid']) ? $_POST['uid'] : $_SESSION['uid'];
I've never seen it before... what the heck is it doing?
if is a more compact version of
if(isset($_POST['uid']) { $uid = $_POST['uid']; } else { $uid = $_SESSION['uid']; }
If the value of the first subexpression is TRUE (non-zero), then the second subexpression is evaluated, and that is the result of the conditional expression. Otherwise, the third subexpression is evaluated, and that is the value.
http://us4.php.net/manual/en/language.expressions.php
it is a variation on the old if/then/else syntax.
I believe that it is much more common in c/c++