Search results for 'form'. 1 post(s) found.
- 2007/10/16 PHP form handling example in single page
This example shows a very simple form together with the form handling process on a single page.
<?
//check if the submit variable exists
if ($_POST['Submit']) {
$mytext=$_POST['mytext'];
echo "<BR>got submission<BR>";
echo "<BR> you entered: $mytext<BR>";
//process form action
} else { //no form has been submitted, so display the form
?>
<form name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>">
<input name="mytext" type="text" id="mytext">
<input type="submit" name="Submit" value="Submit">
</form>
<?
}
?>
//check if the submit variable exists
if ($_POST['Submit']) {
$mytext=$_POST['mytext'];
echo "<BR>got submission<BR>";
echo "<BR> you entered: $mytext<BR>";
//process form action
} else { //no form has been submitted, so display the form
?>
<form name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>">
<input name="mytext" type="text" id="mytext">
<input type="submit" name="Submit" value="Submit">
</form>
<?
}
?>
Another posts included in "PHP"
| PHP if...else... example (0) | 2007/10/16 |
| How to include a file with error reporting ? (0) | 2007/10/16 |
| How to check if a file exists ? (0) | 2007/10/16 |
| How to get reffering URL ? (0) | 2007/10/16 |
| How to convert formatted date time string to datetime? (0) | 2007/10/12 |
| How to remove or set time limit that defined as max_execution_time in p... (0) | 2007/09/18 |
| Adding and Subtracting Time (0) | 2007/09/13 |
| The three simplest regular expressions you will use in PHP (0) | 2007/09/12 |
Trackback : Cannot send a trackbact to this post.
-
Subject different money making ideas
2010/01/29 04:30
moneyideas
-
Subject different money making ideas
2010/01/29 13:24
moneyideas
-
Subject different money making ideas
2010/01/31 16:42
moneyideas

Prev

Rss Feed