close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Login Check Time In Database

Thread began 10/23/2009 11:27 am by Cologne | Last modified 10/24/2009 11:01 am by anonymous | 1917 views | 3 replies |

Cologne

Login Check Time In Database

Hello,

when I create a login with SA I pick for example username ans password from the database and check it against the formular fields. great, easy works.

Now I got a timecode im my database. how can I check that agains the real time?

I pick the timecode from the database with the lightning button. How can I say...

Login success IF database timecode IS <= actual TIME

Can I use simple >= <?php echo $actualTime; ?>

Cheers
Denis

Sign in to reply to this post

anonymous

Denis,

You could work it into the query when authenticating - which would probably be the easiest method.

You would do this by comparing your column's time to CURTIME() or CURDATE(). Those are simple MySQL commands that can be used right in your query as is and will return either the exact Current Time or Current Date... so you simply add a clause to your recordset Select stament making it say WHERE mytime < CURTIME(). Then if no record is returned, you don't allow authentication and create a redirect.

Cheers,

Brian

Sign in to reply to this post

Cologne

Hi Brian,

do you mean in the wizard? (look the image)
Is it possible to set bigger, smaller and equal?

Cheers
denis

Sign in to reply to this post

anonymous

Denis,

I would actually try to make this comparison inside the SQL statement if possible. First, generate everything with the wizard... then go back and hand code the comparison into the SQL using the "WHERE" clause." Then beneath that, you can a conditional PHP logic that states if no record shows up after you created the WHERE clause, then you know that the user doesn't qualify for site entry and then create a redirect.

If you use the wizard and post your code, I can help you about a bit more... I will be in and out the rest of the day but will do what I can.

Cheers,

Brian

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...