Ad block is installed and active. Please support us by disabling it.
HomeFriday, April 20, 2018, 20:00:20
1

PHP Form Action Self Submit

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

Explode — Split a string by string.

PHP highlight_string - PHP Tutorial

Outputs or returns a syntax highlighted version of the given PHP code using the colors defined in the built-in syntax highlighter for PHP. Requirement(s): PHP Server.

Random MySQL Query

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

PHP filesize

The filesize function returns the size of the specified file.

Create dynamic Web Pages with PHP & MySQL

Create dynamic Web Pages with PHP & MySQL, Requirement(s): PHP Server, MySQL

MySQL Tutorials

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

PHP Mail

Sends an email.

Upload Attachment - PHP Tutorial

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

Stack Overflow Clone Script - Ja2BU

Open source question and answer script written in PHP, MySQL and jQuery. Main features are: SEO friendly url's, private message system, rating system, comments system.

PHP form with image upload

Advanced Contact Form with email and form field validation.It allows your visitors to send you an email directly from your website.Features: Image Upload, HTML Output, Captcha Image.
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.