Ad block is installed and active. Please support us by disabling it.
HomeSaturday, August 19, 2017, 09:02:44
1

PHP Form Action Self Submit

Tuesday, February 10, 15, 14:10:17, 3 Yaers Ago Via wain, Hits: 3653
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

Sponsor

Related

MySQL Inner Join

MySQL Inner Join - Creating Dynamic Webpages Using PHP and MySQL, Requirement(s): PHP Server, MySQL

PHP form with file upload

Advanced Contact Form with email and form field validation. It allows your visitors to send you an email directly from your website.

PHP/MySQL Bookmarklet - PHP Tutorial

PHP/MySQL bookmarklet, bookmark current page, PHP/MySQL tutorial.

Sitemap

phpForm.net Website Sitemap

Sending HTML Email With Images - PHP Tutorial

Sending HTML Email With Images - Upload Image with PHP - Creating Dynamic Webpages Using PHP and MySQL - Select, Delete, Update..

Captcha V1 - Free PHP Script

An anti-spam form protection image written in PHP, Version: 1.1.

PHP Redirect

Header (location) redirect must be processed before any output to the browser.

PHP $_POST Function

Collect values from a form sent with method post

Tell A Friend with Captcha

This form allows your visitors to suggest your site to a friend. It features an HTML email format and an admin notification email.

Block Visitors From Specific IP Address

Learn How To Restrict Users From Different IP Addresses.
About Author

wain

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