How to write php->mysql queries?

Posted by Bluemagica on Stack Overflow See other posts from Stack Overflow or by Bluemagica
Published on 2010-12-22T11:27:42Z Indexed on 2010/12/22 11:54 UTC
Read the original article Hit count: 867

Filed under:
|

Is there any good tutorial that has all the basic rules for writing queries to store $_Post vars from php to mysql? Like when to use backticks and singleqoutes, and how to safely write code with functions like get_magic_quotes_gpc()?

Another thing is, assuming there is no javascript validation(since the user can easily turn it off), how should I handle empty form fields being sent as empty $_post variables and throwing errors? Do I have to use isset() call on all the post variables?

What is the best way to handle users turning off javascript validation on a form?

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql-query