0

I have read somewhere a long time ago that I could control how my php form and it's assets are dished up from the server by using somthing similar to the following;

<?php if ($_SERVER["REQUEST_METHOD"] == "POST") {?> <div id="err"><?php echo $fnameErr, "<br/>", $lnameErr, "<br/>", $titleErr, "<br/>", $emailErr; ?></div> <?php } ?>

More specifically I rememeber reading about page refreshing; in the sense that a page refresh will return a GET method rather than a post method. I'm not all that versed with php and I'm trying to understand the better practices for valdation and multiple form entry I.e. multiple submits. Is what I remember above true or is there a more practicle answer to my issue?

As highlighted by Pigeon the topic;

POST / REDIRECT / GET

I have since found a similar question on Stack that hover around the same topic here;

Community
  • 1
  • 1
Lewis
  • 1,945
  • 5
  • 26
  • 52
  • 2
    Are you talking about the [`Post/Redirect/Get`](https://en.wikipedia.org/wiki/Post/Redirect/Get) pattern? – Mikey Apr 19 '16 at 09:39
  • Yes after skim reading this appears to be based around the same article I read. This would be overkill for a simple web form though right? Surely there is a simpler way to accomplish multiple submits and or refresh... – Lewis Apr 19 '16 at 09:41

0 Answers0