Ad block is installed and active. Please support us by disabling it.
HomeSunday, December 17, 2017, 04:24:54
1

PHP Form Action Self Submit

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

PHP Fwrite : fwrite

php write to file - how to write data to a file using the php frwite function

Upload Attachment - PHP Tutorial

Upload attachment with PHP example, Requirement(s): PHP server

Smarty - Create dynamic Web Pages with PHP & MySQL

Creating Dynamic Web Pages Using Smarty and MySQL - Requirement(s): PHP Server, MySQL

How to check checkbox checked

Checking if checkbox is checked with jQuery

Sitemap

phpForm.net Website Sitemap

PHP DateTimeZone

PHP representation of time zone

Bookmark Current Page - PHP Tutorial

Bookmark current page with PHP example.

MySQL – Select from two tables

Select data from two tables, PHP MySQL

Process Form Data with Jquery

jQuery, Process form data

MySQL Inner Join

MySQL Inner Join - Creating Dynamic Webpages Using PHP and MySQL, Requirement(s): PHP Server, MySQL
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.