php syntax..giving error
$sql='UPDATE Reg_Stud SET Result=$perc WHERE RegI开发者_如何转开发D="$_SESSION['id']"';
Whts wrong with this syntax
Two problems:
- Variable interpolation does not happen in single quotes.
- An un-escaped quote in a string prematurely terminates the string.
You can do:
$sql='UPDATE Reg_Stud SET Result='.$perc.' WHERE RegID='.$_SESSION['id'];
精彩评论