<td height="25" align="center" valign="middle"><input type='text' name='day2' id='datepicke开发者_如何学运维r2' value='Day 2' readonly="readonly" maxlength="50" style="color:#999999"/></td>
</tr>
<tr>
<td height="25" align="center" valign="middle"><input type='text' name='day3' id='datepicker3' value='Day 3' readonly="readonly" maxlength="50" style="color:#999999"/></td>
</tr>
<tr>
<td height="25" align="center" valign="middle"><input type='text' name='day4' id='datepicker4' value='Day 4' readonly="readonly" maxlength="50" style="color:#999999"/></td>
</tr>
<tr>
<td height="25" align="center" valign="middle"><input type='text' name='day5' id='datepicker5' value='Day 5' readonly="readonly" maxlength="50" style="color:#999999"/></td>
The values Day 4, Day 5, Day 6 etc. are enetring into database. How I block these from entering into database?
How I block these from entering into database?
It sounds like you have some system that takes all your values and posts them to the database... But we can not answer your question without seeing the php code.
Forms have little to nothing to do with mysql insert commands. They just receive information from the browser.
It isn't the most popular method but, you can use the placeholder attribute to still display the default value you want to display and leave the value attribute blank. I do this with a jQuery date picker application.
<input type="text" name="day4" id="datepicker4" value="" placeholder="Day 4" readonly maxlength="50" style="color:#999999"/>
This gives a grayed out effect while still showing the user what should go there. When a value is entered the value attribute takes over.
Also, I have just corrected the attribute tags from single quotation marks to double as well as the readonly attribute.
精彩评论