Giter Site home page Giter Site logo

basemax / webpostphp Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 2.0 20 KB

WebPostPHP is a PHP library to build HTML form to send POST request.

License: MIT License

PHP 100.00%
php html html-form html-forms html-form-builder post-request post-requests post form-post

webpostphp's Introduction

Web Post PHP

WebPostPHP is a PHP library to build HTML form to send POST request.

Purpose of Web Post PHP

Usually POST Requests are better then GET.

Easily convert <a href="index.php?name=adam&city=Berlin&Age=30">Click</a> as GET request to POST request.

Using Web Post PHP

<?php
$WebPost=new WebPostPHP();

$WebPost->add("index.php?name=adam&city=Berlin&Age=30", "Click");

$WebPost->add("index.php", "name=adam&city=Berlin&Age=30", "Click here");

$values=[
  "name"=>"adam",
  "city"=>"Berlin",
  "Age"=>30,
];
$WebPost->add("index.php", $values, "Click here");
?>

HTML Output

<form method="POST" action="index.php" id="web-post-php-1">
<input type="hidden" name="name" value="adam">
<input type="hidden" name="city" value="Berlin">
<input type="hidden" name="Age" value="30">
<button style="background:transparent;border:0px;">Click</button>
</form>

<form method="POST" action="index.php" id="web-post-php-2">
<input type="hidden" name="name" value="adam">
<input type="hidden" name="city" value="Berlin">
<input type="hidden" name="Age" value="30">
<button style="background:transparent;border:0px;">Click here</button>
</form>

<form method="POST" action="index.php" id="web-post-php-3">
<input type="hidden" name="name" value="adam">
<input type="hidden" name="city" value="Berlin">
<input type="hidden" name="Age" value="30">
<button style="background:transparent;border:0px;">Click here</button>
</form>

Max Base

My nickname is Max, Programming language developer, Full-stack programmer. I love computer scientists, researchers, and compilers. (Max Base)

Asrez Team

A team includes some programmer, developer, designer, researcher(s) especially Max Base.

Asrez Team

webpostphp's People

Contributors

basemax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

diypa571

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.