Giter Club home page Giter Club logo

unposter's Introduction

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

unposter's People

Contributors

thedefinitionist avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.