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. Quote Link to comment 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\" />"; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.