I dont know whether it is right to post it over here.
Can someones suggest some beginner resources for this topic.
Thanks in advance.
I found Added Bytes' Writing Secure PHP a good guide when I was starting out with PHP.
I'm not sure if this is an exact duplicate of one of these questions, but you can start reading here in SO itself:
In addition to the resources already posted, here are some points to keep in mind:
You should also be familiar with how some common attacks work such as SQL Injection and Cross Site Scripting (XSS)