HomeSaturday, December 3, 2016, 06:42:26
1

PHP Form Action Self Submit

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

Web Hosting


Related

PHP Tutorials

Useful step-by-step PHP tutorials for beginners

PHP Form Basic

PHP Form - PHP form basic, Requirement(s): PHP Server

E-Cards 1.1. PHP Script

This script will allow your visitors to send e-cards to their friends. It features admin notification and HTML output.To use the "e-cards" script completely free , the "powered by" link at the bottom of the pages must stay intact.

Block Visitors From Specific IP Address

Learn How To Restrict Users From Different IP Addresses.

Sending HTML Email With Images - PHP Tutorial

Sending HTML Email With Images - Upload Image with PHP - Creating Dynamic Webpages Using PHP and MySQL - Select, Delete, Update..

Site Recommendation

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

PHP Cookies - setcookie

Defines a cookie to be sent along with the rest of the HTTP headers.

MySQL – Select from two tables

Select data from two tables, PHP MySQL

How to insert new line (IP Address) with fwrite

How to insert new line (IP Address) with fwrite, Get IP address and write to file.

Tell A Friend with Captcha

This form allows your visitors to suggest your site to a friend. It features an HTML email format and an admin notification email.
About Author

wain

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