Jump to content

Semi Login form Help


Psycho3D

Recommended Posts

I am working on a site where the user clicks on a video to watch. When clicked I want to redirect them to a registration form that basically asks name, email and a password. The password is predetermined by the company I work for and are sent to the users. They do not create their own passwords, this not a login system it is just to verify what users are watching the video. after they enter their information and the password is verified it goes to the video. I know how I could do this for each individual video but that would create 100's of registration forms. I am looking for a way to use 1 form to check the passwords in the database and continue on. Any suggestions? I am a novice at PHP.

 

 

(in reality, I wanted to use a real login system, but my boss didn't , so I am having to work in the constraints of the boss's wishes)

Edited by Psycho3D
Link to comment
Share on other sites

It's still a login system. 

 

The code that is triggered by the user when he selects the video needs to pass in the video name to your login script (which all selections will call).  Your login script does the validation while saving the parm passed into it and once the user is cleared, you then call the "display" script passing it the parm with the video name to be displayed.

 

Ex.

 

html anchor tags (?) with the names of the videos (?) and an href like this:

 

<a href="videologin.php?name=videoname1">videoname1</a>

<a href="videologin.php?name=videoname2">videoname2</a>

etc.

 

In your login script

 

$videoname = $_GET['name'];

 

(do your code to display the login screen storing the videoname as a hidden field on that screen)

(do your code to handle the input credentials and to check them)

 

be sure to retrieve the hidden videoname:

$vidname = $_POST['videoname'];

 

then call your display script:

 

Header("Location: displayvideo.php?name=$vidname");

 

In your display script:

 

$videoname = $_GET['vidname'];

 

(now do your code to put up a video player with the $videoname file)

 

I would do this as 3 programs - one to show the video names for the user; one to do the login process; the third to do the video playing.

Link to comment
Share on other sites

Create a login system and call it a "Video Tracking" system. Your boss doesn't know his/her ass from his/her face if what you've described is actually what your boss wants. That said I don't know the project requirement details so perhaps he does know where his/her ass is. What you've said however, leans be towards believing he/she doesn't.

Edited by cpd
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.