View Full Version : echo name

Jan 18th, 2009, 12:01 AM
<td width="623"> <form name="form1" method="post" action="index.htm">
<p align="center"><input type="text" name="formtext1" size="62"><input type="submit" name="GetDate"></p>
<td width="1218" colspan="2">
<p align="center"><?PHP echo form1 ?></p>

I'm trying to get a form where it will echo the name you type in the text box when you press submit.

Please help

Jan 18th, 2009, 12:15 AM
<form action="index.php" method="post">
<input type="text" name="inputname">
<input type="submit" value="Submit">


echo $_POST[inputname];


Save this in a file called index.php and run it on a php enabled server and that will do as you ask.

Jan 18th, 2009, 12:15 AM
This is a php question not an html one.

<?php echo htmlentities($_POST['formtext1']); ?>