POST -> aid 6
shows that the server is indeed receiving the data. Something else is clearing $_POST at some point before it reaches the if
statement.
While you had require_once "$_SERVER[DOCUMENT_ROOT]/core/init.php";
commented out, your jQuery data
contained the expected value. It was still commented out when you posted the Firebug info, hence the database connection error messages. Those messages, which you've since removed, indicates errors on line 7 of projects.php which tells me that your testing a file with more code than you posted here. It's not uncommon for people to show us a portion of their code, in fact, it's encouraged; however, in this case it's problematic because the error doesn't lie in the code you gave us.
Inorder to validate this finding and save your sanity, rename projects.php temporarily to projects.backup.php.
Create a new file called, "projects.php" and run the following code (and ONLY the following code) through AJAX:
<?php
if(isset($_POST['aid'])) {
$aid = $_POST['aid'];
echo $aid;
} else {
echo 'fail';
}
?>
Incidentally, %0D%0A is the Windows® newline combo, CRLF (carriage return + line feed)