posting with forms html
<form method="POST" action="INSERT WHERE YOU'RE SENDING THE DATA TO HERE">
<input type="text" name="INSERT DATA KEY NAME HERE"> <!-- You don't have to have this line -->
</form>
posting with forms html
<form method="POST" action="INSERT WHERE YOU'RE SENDING THE DATA TO HERE">
<input type="text" name="INSERT DATA KEY NAME HERE"> <!-- You don't have to have this line -->
</form>
html form
<form action="/action.php">
<label for="fname">First name:</label><br>
<input type="text" id="fname" value="Mike"><br><br>
<label for="lname">Last name:</label><br>
<input type="text" id="lname" value="Walker"><br><br>
<input type="submit" value="Submit">
</form>
Html By Duco Defiant Dogfish on Feb 11 2020
<form action="/action_page.php">
First name:<br>
<input type="text" name="firstname" value="Mickey"><br>
Last name:<br>
<input type="text" name="lastname" value="Mouse"><br><br>
<input type="submit" value="Submit">
</form>
how to access form data usinf method get
// Check if the form is submitted
if ( isset( $_POST['submit'] ) ) {
// retrieve the form data by using the element's name attributes value as key
echo '<h2>form data retrieved by using the $_REQUEST variable<h2/>'
$firstname = $_REQUEST['firstname'];
$lastname = $_REQUEST['lastname'];
// display the results
echo 'Your name is ' . $lastname .' ' . $firstname;
// check if the post method is used to submit the form
if ( filter_has_var( INPUT_POST, 'submit' ) ) {
echo '<h2>form data retrieved by using $_POST variable<h2/>'
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
// display the results
echo 'Your name is ' . $lastname .' ' . $firstname;
}
// check if the get method is used to submit the form
if ( filter_has_var( INPUT_GET, 'submit' ) ) {
echo '<h2>form data retrieved by using $_GET variable<h2/>'
$firstname = $_GET['firstname'];
$lastname = $_GET['lastname'];
}
// display the results
echo 'Your name is ' . $lastname .' ' . $firstname;
exit;
}
forms in html
<html>
<form action= "your site" method = "post/get">
</form>
</html>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us