Dear Stackoverflow members,this question might seem very trivial and honestly I search for an answer however although there are similar queries around, none of the solutions delivered seem to work on what I am trying to achieve. I will put forth a generic snippet to understand what I am trying to achieve.
var dd = addday.getDate() + xdays; //addition of days to user input date
document.getElementById("Days").value= displaydate;//loading date to Days
where displaydate is in the following format:
var displaydate = dd+'/' + mm + '/' + y; //showing date format
and value shown in real time is displayed in the following input (disabled) box:
<label><b>Expiry Date:</b></label><input type="text" name="Days2" id ="Days2" disabled>
All the above is in a form. What I want to achieve thereafter is that when the user presses submit, that value attained and displayed by the getElementById is inserted in a table.
$addquery2="INSERT INTO 3pxdef_tb(defRef,tlpID,RaisedBy,RaisedDate,defDesc,defCAT,expDate,closedBy,closedDate,acID)VALUES('$_POST[def]','$_POST[tlptsel]','$_POST[raisedby]','$_POST[draised]','$_POST[des]','$_POST[catsel]','$_POST[Days]','$_POST[clby]','$_POST[closeddate]','$acindex')";
Unfortunately this is not working since an undefined index is being returned by the system.
Can I ask your assistance in this matter?
Thanking you so much.