php - Link visible between certain times -


i me please.

i need link visible between times 6pm & 1am in evenings. clients registered on site can change times of store opening , closing times within admin panel , connects table in database.

the link needs visible during specified times client decides via control panel. out side of these hours link hidden/not visible , not clickable.

so needs call/echo times database table each customer.

any great. many thanks

mark

you use like...

// check if date (current hour) between 2 times,  // if is, assign link $link, else assign nothing $link $link = date('h') >= 6 && date('h') <= 20 ? '<a href="#">link</a>' : ''; // replace hardcoded hours vars if needed echo $link; 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -