什么是意外T_STRING [关闭]

everytime i try to run this it comes up with this error

Unexpected T String in line 35, 36 , 40

mysql_query("UPDATE completed SET offer_id=campid WHERE id ='".$sid."'");
mysql_query("INSERT INTO completed reward) VALUES ".$payout." * 0.5);
mysql_close();
echo "Success: ".$sid." earned ".$payout." * 0.5 points
 and is referred by nobody";

There is an error on all lines expect for mysql_close(); and the rest of my code is clean what is the problem?

It means your code had a compilation error. You can see it here on Stack Overflow with the color of the code rendered in your question.

mysql_query("INSERT INTO completed reward) VALUES ".$payout." * 0.5);

...should be:

mysql_query("INSERT INTO completed reward) VALUES ".$payout." * 0.5");

...or better yet, using PHP's double-quote string substitution:

mysql_query("INSERT INTO completed reward) VALUES $payout * 0.5");

This will get you past the compilation error... But I think you need to take a second look at your query. I don't think you meant that closing parenthesis in INSERT INTO completed reward) VALUES...

The syntax highlighter shows you exactly where the rrror is. You're missing a quote:

mysql_query("INSERT INTO completed reward) VALUES ".$payout." * 0.5); //

ahould be

mysql_query("INSERT INTO completed reward) VALUES ".$payout." * 0.5");