title: Preventing fake forms from sending data to server
body: <p>Suppose that I have a comments form, and I want to prevent bad users from copying the form html source code , with the action attribute to use it elsewhere outside my website.</p>
  
  <p>What I have to do?</p>
  
  <p>I got a simple idea, But I don't know if it's working or not (even I don't know what php methods to use)</p>
  
  <p>The idea is to add a variable $ip in the page, this $ip is the php file (and form) location (maybe using $_SERVER['PHP_INFO'] or other)... then sending this variable to the add.php file with a POST method but without displaying in the html code source.</p>
  
  <p>in add.php , the server will check if the ip of the page is equal to the ip adress of the server or not , then it will decide wether to add comment or kill the operation. </p>
  
  <p>I hope discuss about this subject </p>
  
  <p>thank you in advance </p>