Example:
$success = mysql_query($UpdateFileNameQuery) ? 1 : 0;
This is a typo I have seen over and over, my students don't seem to realise that once php finds a ";", it asumes that your block of code has ended and tries to move on to the next block of code.