makamo66 Posted May 18, 2010 Share Posted May 18, 2010 I have an html textbox that was written like this: echo "<b>Quantity:</b> <input type=\"text\" name=\"qtyBox\" value=\"1\" size=\"1\" />"; When the form is submitted I collect the value of the textbox like this: $_SESSION['qtyBox'] = $_POST['qtyBox']; $qtyBox = $_SESSION['qtyBox']; echo $qtyBox; The problem is that no matter what I type into the text box, the value is echoed out as 1. If I leave the value blank and type a number into the box, I get a blank too. Link to comment https://forums.phpfreaks.com/topic/202197-cant-override-the-default-value-of-the-textbox/ Share on other sites More sharing options...
JAY6390 Posted May 18, 2010 Share Posted May 18, 2010 echo "<b>Quantity:</b> <input type=\"text\" name=\"qtyBox\" value=\"1\" size=\"$qtyBox\" />"; Link to comment https://forums.phpfreaks.com/topic/202197-cant-override-the-default-value-of-the-textbox/#findComment-1060280 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.