Ad block is installed and active. Please support us by disabling it.
HomeTuesday, February 20, 2018, 01:39:26
1

PHP Form Action Self Submit

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

FeedBack Form with Captcha

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

PHP Fwrite : fwrite

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

RSS, MySQL & Smarty

Smarty > Publishing MySQL Data in RSS 2.0

Creating a CAPTCHA with PHP with imagecreate

This tutorial will show you how to create a form with Captcha, Requirement(s): PHP Server, GD Graphics Library

PHP Tutorials

Useful step-by-step PHP tutorials for beginners

PHP $_GET Function

Get function in PHP

Creating a Math CAPTCHA with PHP - PHP Tutorial

This tutorial will show you how to create a form with Math Captcha.

php Array

These functions allow you to interact with and manipulate arrays in various ways. Arrays are essential for storing, managing, and operating on sets of variables.

Getimagesize

Getimagesize function will determine the size of any given image file and return the dimensions along with the file type and a height/width text string to be used inside a normal HTML IMG tag and the correspondant HTTP content type.

PHP Write to File

PHP Write to File :: PHP Tutorial, requirement(s): PHP server
About Author

wain

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