I need to stop taking bids on a predetermined date at a specific time. I have the auction beginning and end defined in a table. At the specified end time, I need the form to disallow any more bids.
$submitdate = $_POST[submitdate];
$qry = "SELECT * FROM items WHERE itemid = ".$_POST[itemid];
//qry will only yield 1 record
$qryrecset = mysql_db_query($dbname, $qry);
$array = mysql_fetch_array ($qryrecset);
if ($submitdate < $array[datetimefield]){
insert the submitted form data into the database
}else{
echo "I'm sorry but the auction is over.";
}
How do I set up the datetime field and, do the query, and the 'if' comparison to check the date and time?
Mr. Grammar