Skip to content

thielicious/unPOSTer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unPOSTer

Tiny PHP API which prevents re-posting on page refresh


INTRODUCTION

Built with PHP (7.09)
unPOSTer is a tiny API which prevents form reposting on page refresh. It basically stops you from encountering a re-POST alert prompt.

SETUP INFORMATION

Use your CLI and enter the following to clone:
git clone https://github.com/thielicious/unPOSTer.git

Or click below to choose your download option:
» Download unPOSTer

Then instantiate and embed it at the top of your PHP page.
For a detailed installation click here here.

USAGE

Create an object :

require_once "unPOSTer.class.php";
$unpost = new unPOSTer("KEEP_POST");
$unpost->unPOST();

For a more detailed documentation visit me at thielicious.github.io

Methods

unPOSTer::unPost()
» assigns POST data to the session value and sends it to the header as GET request.

unPOSTer::retrieve("<POST_data>")
» retrieves the session value which actually contains POST data. This will show you the posted content and keeps it.

unPOSTer::reset()
» optional: if you don't want to keep the data, it will clear the session value.



🆕 A Demo has been added to this repository.

If you encounter any bugs, feel free to open up an issue, thank you.

thielicious.github.io

Releases

No releases published

Packages

No packages published

Languages