I have two text inputs and I am trying to insert their values into my SQL database, but for some reason when i preset the input tags with any value ( numeric or alphabetical ) my ‘$_POST’ if statements fail to pick them up on the next page.
<form action="select-process2.php" method="post" name="phoneselect">
<td><input name="B1-Name" maxlength="40" type="text" value="999" disabled="disabled"/></td>
<td><input name="B1-Target" maxlength="15" type="text" value="999" disabled="disabled"/></td>
</form>
select_process2.php is where I try and capture the posted values from my form, the code for which is below:
if (isset($_POST['B1-Name']))
{ $B1name = $_POST['B1-Name'];
if (isset($_POST['B1-Target']))
{ $B1target = $_POST['B1-Target'];
}
}
echo "$B1name<br />";
echo "$B1target<br />";
Its at this point that I would normally see the passed values of my inputs, however if they have the reset value=”999″ like in the earlier code block it simply fails and I can’t see why, does anyone have any ideas?
The fields are
disabledso they won’t be included in the submitted data.You might be looking for
readonlyinstead.