Is it safe to accept post data from a remote form?

codeigniter, forms, php, post, security

Solution

It's as safe as having a form on your own website. Client-side objects are easily manipulated, therefore even if you have a form on your website which has a character restriction (for example), it can be modified.

The key is having your validation correct server side.

Problem

I am currently building a project where I want users to be able to create forms on their site on their own (not using any tools of ours) and just put some hidden variables in the form that have their account number or some unique identifier and then change the action on their form to our sites form processing link. What i'm wondering, is if it is safe, or, will it cause problems accepting post data from some random site. I'm thinking that we'd have a hidden field called "account" and when the page gets a post, it would first check if "account" is set. Then if it is set, it would check to see if the value is a real customer of ours. Then AFTER all that it would sanitize the post data and enter it to our lead capture database. I know places like zoho offer forms you can copy and paste and then when they get submitted, zoho enters all the information to their system. If i'm going about this in a terrible way, suggestions on the best / a good way to implement a remote form posting to our SAAS app would be helpful. Thanks!

Original source