Home Blog 2008 01 31 Php-html-forms-and-post-method-code PHP HTML forms and Post Method Code

 
 

Share on Google+Share on Google+
PHP HTML forms and Post Method Code
Posted on: April 3, 2006 at 12:00 AM
Advertisement
PHP HTML forms and Post Method Code: retrieve the form data and display the input on same page.

PHP HTML forms and Post Method Code

PHP html function

With the given PHP HTML Code one can retrieve the form data and display the input on same page.

PHP HTML Code

<HTML><BODY>
<FORM METHOD=?POST? ACTION=?index.php?>
<H2>Please Enter your Details?</H2>
<BR>Name:
<BR><INPUT TYPE=?TEXT? NAME=?Nickname?><BR>
<BR>Age:
<BR><INPUT TYPE=?TEXT? NAME=?age?><BR>
<BR>Contact Number:
<BR><INPUT TYPE=?TEXT? NAME=?number?><BR>
<BR>Email Address:
<BR><INPUT TYPE=?TEXT? NAME=?emailid?><BR>
<BR>
<INPUT TYPE=?SUBMIT? name=?Go?>
</FORM>

<?php

$Nickname = $_POST[?Nickname?];
$Age = $_POST[?age?];
$Number = $_POST[?number?];
$Email = $_POST[?emailid?];

echo ?<BR>Nickname: $Nickname?;
echo ?<BR>Age: $Age?;
echo ?<BR>Contact Number: $Number?;
echo ?<BR>Email Address: $Email?;

?>
</BODY>
</HTML>

This small PHP HTML Code tells you, how to create html forms and display data using PHP Post Method in PHP.

Advertisement

Related Tags for PHP HTML forms and Post Method Code:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: April 3, 2006

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com