HomeSaturday, August 18, 2018, 20:19:56
1

PHP Form Action Self Submit

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

Upload Image With PHP

[Example3] Tutorial - How to upload image in php.

PHP Str_replace - PHP Tutorial

This function returns a string or an array with all occurrences of search in subject replaced with the given replace value.

PHP str_replace

str_replace - This function returns a string or an array with all occurrences of search in subject replaced with the given replace value

Send This Link PHP Script

A popup form which allows your visitors to send a referral link from your site. It features admin notification and HTML output.

PHP Jquery Form

PHP Jquery Form allow your visitors to contact you directly from your website.

PHP Fwrite : fwrite

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

Inserting form data in MySql table

Inserting form data in MySql table with PHP

Bookmark Script

Allow your users to easily bookmark your site, by clicking on a link on the page.

MySQL Tutorials

MySQL tutorials, MySQL training, learn MySQL, MySQL Tutorial with practical examples.

MySQL to RSS

Publishing MySQL data in RSS
About Author

wain

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