HomeTuesday, May 23, 2017, 20:25:59
1

PHP Form Action Self Submit

Tuesday, February 10, 15, 14:10:17, 2 Yaers Ago Via wain, Hits: 3112
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 Attachment - PHP Tutorial

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

Jquery PHP Contact Form

This script allows your visitors to send you an email directly from your website.

Advanced Contact Form - PHP Script

Advanced Contact Form with email and form field validation. Features: HTML Output(Response), Captcha Image.

PHP Jquery Form

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

Upload File with PHP

Basic file uploading with PHP

Captcha V1 - Free PHP Script

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

Inserting form data in MySql table

Inserting form data in MySql table with PHP

MySQL to RSS

Publishing MySQL data in RSS

Random MySQL Query

Random MySQL query, requirement(s): PHP Server, MySQL

Site Recommendation

This script will allow your visitors to recommend your site to their friends.
About Author

wain

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