Hi what I’m trying to do is insert a time period value in my database which is enrollperiod and the format is:
MONTH+ STRTDAY+ ENDDAY, To get these values i have 3 text areas and combine them like so:
$enrollp= $_POST['month'] . $_POST['strtday'] . $_POST['endday'];
(I’m not focused on SQL injections right now but don’t worry iv’e read some PDO and prepared statement articles)
And i would insert this like so:
$sql="Update tbl_enroll set enrollperiod='$enrollp'";
my problem is what data type should enrollperiod have?
and how should i be able to retrieve the value inside on enrollperiod and use is in this code:
if (date('m') == '09' && date('d') == '12' && date('d') == '12' && $allowed)
The above line is not modified to check for the start date and end date I’m not sure how to perform it. Would appreciate any help.
Every field (attribute) in a database relation (table) must be ATOMIC.
Why do you want to combine these values in one field? is there a logical reason for doing this?