-1

How can I secure a form Post?

Example:

File1 - form.php
File2 - action.php

The form.php posts to action.php.

How can I find out if the form data in action.php was really posted from form.php?

Nisse Engström
  • 4,738
  • 23
  • 27
  • 42

2 Answers2

-1

You use $SERVER['HTTP_REFERER'] in action.php find the Post source

Aaron
  • 1
  • 1
-1

If u are using the post method to send data to action.php it is some what secure than the get method

    <form action="action.php" method="get">
//ur elements
    <br><input type="submit"></form>
Brotherhood
  • 11
  • 1
  • 4
  • post is no more secure than get –  Dec 31 '15 at 05:48
  • As far as security, they are inherently the same(GET/POST). POST is good for standard forms used to submit one time data. I wouldn't use GET for posting actual forms, unless maybe in a search form where you want to allow the user to save the query in a bookmark, or something along those lines. – Brotherhood Dec 31 '15 at 06:21