HomeSunday, January 22, 2017, 20:24:26
1

PHP Form Action Self Submit

Tuesday, February 10, 15, 14:10:17, 2 Yaers Ago Via wain, Hits: 2452
PHP form action self submit tutorial, requirement(s): PHP server
index.php
Code:
<?php
if(isset($_POST['submit']))
{
$filed1 = $_POST['field1'];
echo $filed1 . " ";
echo $filed2;
}else{
?>
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<input type="text" name="field1">
<input type="hidden" name="filed2" value="hidden value">
<input type="submit" name="submit" value="Submit Form">
</form>
<?php } ?>

jonix Thursday, June 27, 2013, 08:16:05

replace:

$filed1 = $_POST[\'field1\'];

with:

$filed1 = $_POST[\'field1\'];
$filed2 = $_POST[\'field2\'];

Sign In

Web Hosting


Related

Inserting form data in MySql table

Inserting form data in MySql table with PHP

PHP $_POST Function

Collect values from a form sent with method post

Images In Textarea - CSS

Tutorial Images in Textarea

ShoutBox 1.1. PHP Script

ShoutBox allows your users to post short messages on your site. The script is lightweight and very easy to install and use.

Meta Tags Generator 1.1. PHP Script

This script will allow your visitors to create meta tags online.

PHP Cookies - setcookie

Defines a cookie to be sent along with the rest of the HTTP headers.

PHP getdate

Returns an associative array containing the date information of the timestamp, or the current local time if no timestamp is given.

Captcha V2 - Free PHP Script

PHP Captcha protection image Version 2, - Requirement(s): PHP Server, GD Library

Block Visitors From Specific IP Address

Learn How To Restrict Users From Different IP Addresses.

PHP filesize

The filesize function returns the size of the specified file.
About Author

wain

Date Registered: Sun, Feb 8, 15
Last Time Online: Thu, Dec 8, 16
So far has created 115 entries.
wain
This author has not yet filled in any details.