1

I have following query

$sql=" UPDATE reg_voters_t SET county='$county', constituency='$constituency', regcenter='$regcenter' WHERE IDNo='$IDNo'";

When i run above query i am getting this error-

Parse error: syntax error, unexpected '$sql' (T_VARIABLE) in 15

1 Answer 1

6

the problem probably is that the line before your SQL query is missing semicolon (;). The error begins in $sql so it has to be something before.

$a = 10
$sql = "UPDATE reg_voters_t SET county='$county', constituency='$constituency', regcenter='$regcenter' WHERE IDNo='$IDNo'";

line before code containing '$sql' declaration is missing semicolon

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.