Jump to content

PHP in one ear and out the other please help


dj666

Recommended Posts

Ok guys so here is the situation i have never touched php + mySQL before but at the moment it's looking like the best option for the functions i require but unfortunately i am sitting here staring blankly at tutorials, usually i pick things up fast but my brain just isn't functioning at the moment.

 

what i am trying to do is create a script that will

1 - Consist of a password box (when entered correctly forwards you to another page) and a Generate Button

2 - when this generate button is clicked it will create a randomly generated password emailed to a specific email address and be deleted 2 hours after generation

 

the point basically being if i allow someone to view that page i want it to be only when i allow them and not have to worry about changing passwords everytime it is given out for once off use

 

at the moment i am not thinking it is possible but would love to know if otherwise

 

Thanks

Link to comment
Share on other sites

overview...

 

user table

id - int auto increment

username - varchar

password1 - varchar

email - varchar

password2 varchar

last_used - datetime

 

last_used is the date/time the user was issued the password 2 (which in the password you periodically generate)

 

you will be using a couple of session variables (logged_in and last_used)

if last_used session variable is less than current time - 2hrs, they can access the special page, if the time difference is greater than 2 hours they get directed to the generate button page

 

so you will need to learn to:

. create database tables

. create login/register form

. process form data

. insert new data to database table

. retrieve data from a table

. update a table

. start session

. store and retrieve session variables

. redirect

 

 

lots of good tutorials here

http://www.tizag.com/phpT/

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.