web 2.0

How to use PHP & Input Text Field/Textbox

How to use PHP & Input Text Field/Textbox This tutorial how to using PHP read a variable from input textbox

ShotDev Focus:
- Using PHP & Textbox

Example

php_textbox1.php


<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<form action="php_textbox2.php" method="post" name="form1">
<input type="text" name="txtSiteName">
<input name="btnSubmit" type="submit" value="Submit">
</form>
</body>
</html>

php_textbox2.php


<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<?
echo $_POST["txtSiteName"];
?>
</body>
</html>

Create a php file and save to path root-path/myphp/

Run
http://localhost/myphp/php_textbox1.php

Screenshot

PHP Textbox


PHP Textbox

.
.
.

Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (1 votes, average: 1.00 out of 10)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.