Jump to content

Can't Override the Default Value of the Textbox


makamo66

Recommended Posts

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.

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.