Skip to content

Instantly share code, notes, and snippets.

Created May 18, 2021 17:24
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Example POST request
<!DOCTYPE html>
<meta charset="utf-8">
<title>Electronic form</title>
<form method="POST" id="webform" name="webform" action="target.php">
<label for="iduser">User ID:</label>
<input type="text" id="iduser" name="iduser"> <br />
<label for="idplaylist">Playlist ID:</label>
<input type="text" id="idplaylist" name="idplaylist"> <br />
<label for="v">Video ID:</label>
<input type="text" id="v" name="v"> <br />
<button type="submit">Send data</button>
// Prints the values of each field on the page
"The user identified as " . htmlspecialchars($_POST["iduser"], ENT_QUOTES, "UTF-8") . " added the video whose ID is " . htmlspecialchars($_POST["v"], ENT_QUOTES, "UTF-8") . " to the playlist " . htmlspecialchars($_POST["idplaylist"], ENT_QUOTES, "UTF-8") . "."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment