There are two problems, both involving the first line:
$sql="mysql_query("SELECT running FROM users WHERE username = '".$_SESSION['username']."'")";
First of all, your substrings are not properly delimited. You can use either ' or " as string delimiters in PHP, but you must use one or the other to delimit any given expression. If you open a string with ', you must also close it with '; if you open it with ", you must close it with ".
In your code, PHP recognizes the first " as the opening delimiter; when it gets to the second ", it closes the substring and tries to interpret the rest as PHP code. In other words, PHP is seeing this:
$sql = "mysql_query(" ...expecting PHP code here...
Note the color coding in the quoted code; any good code editor will also highlight your code to help you catch syntax errors. See how the code turns red when the string is opened, and reverts back to blue when it's closed? That tells you that the PHP parser will try to interpret the blue stuff as code, rather than a string.
If you need to include the delimiter character as part of the string, you need to escape it with the backslash. For example:
$mystring1 = "This string contains \"quotation marks\"!";
$mystring2 = 'And \' this \' string \' contains \' apostrophes!';
$mystring3 = "But it's okay to include apostrophes (') when using quotation marks as delimiters.";
$mystring4 = 'Or vice-versa, as you can see from the presence of "quotation marks" in this string.';
However, the real problem is that you don't need the outermost set of " marks. Even if you fixed the problems with the delimiters, all you'd be doing is designating $sql as a string that contains the following text:
mysql_query("SELECT running FROM users WHERE username='whatever'")
What you really want to do is execute this code, not assign it as a string.
Here's how it should read:
$resultset = mysql_query("SELECT running FROM users WHERE username = '".$_SESSION['username']."'");
Does that help?