QUOTE(Christian J @ Oct 18 2016, 08:19 PM)
QUOTE(tudsy @ Oct 18 2016, 09:51 PM)
Is this code correct?
No, the onclick event calls
client-side javascript. You can't call a
server-side PHP function like that.
Good catch, It never occurred to me that he would try calling PHP from Javascript!
QUOTE(Christian J @ Oct 18 2016, 08:19 PM)
Frankly I'm surprised that you make mistakes like that. Client-side and server-side are fundamental distinctions that you absolutely need to understand before writing any PHP.
I agree.