Learn details on retaining post back values of a form here
Here is one text box inside a PHP code area. We will learn here how to retain the text box value after the form is submitted.![Post box with newspaper holder design Post box with newspaper holder design](/uploads/1/3/7/5/137563401/834221746.jpg)
Here to take care of some characters like & we have used urlencode and urldecode to first encode the date before sending through the address bar and then after receiving at main page again we will decode it to get the original data entered by the visitor.
Here is the code of the form with decode script. Now we will go to the second page were the form date is collected and posted back to main page. Here is the code of pb-text.php
From pets to beauty and overseas treats, there’s a range of products to choose from. KVARNVIK Storage box with lid704.128.75. Paper is amazingly versatile in that, after its life as a newspaper or cereal box, it can be washed down into a. Autocad architecture. This item will post to Russian Federation, but the seller hasn't specified postage. Buy it now - Home Desktop Tissue Box Bamboo Wood Lid Paper Holder. Quality watch holder for sale from - 2895 watch holder - China watch holder manufacturers from China.
Here is one text box inside a PHP code area. We will learn here how to retain the text box value after the form is submitted.
Text box within a form
Receiving the textbox data
Form is submitting the data by attribute action=pb-text2.php to pb-text2.php file, inside which we will keep this code to receive data and display the same.![Post box with newspaper holder design Post box with newspaper holder design](/uploads/1/3/7/5/137563401/834221746.jpg)
Keeping Default data inside Textbox
We will use default attribute to keep some default data inside input textbox. Source of this data can be a variable or we can display by taking data from a database table. When the page is loaded the data stored in PHP variable will be stored and displayed inside text box as default value. Here is one example Outpt is hereRedirection of submitted data to input form
In this text box we will store the value entered by the user. This form is submitting to another page where the PHP code will collec the data and it will redirect ( or back ) to main page with the value of data in query string. We will use PHP header redirect in the second page ( page to which form data will be submitted ) to post back the data to the main page having the form.Here to take care of some characters like & we have used urlencode and urldecode to first encode the date before sending through the address bar and then after receiving at main page again we will decode it to get the original data entered by the visitor.
Here is the code of the form with decode script. Now we will go to the second page were the form date is collected and posted back to main page. Here is the code of pb-text.php