Psycho3D Posted June 5, 2013 Share Posted June 5, 2013 (edited) 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 June 5, 2013 by Psycho3D Quote Link to comment https://forums.phpfreaks.com/topic/278802-semi-login-form-help/ Share on other sites More sharing options...
ginerjm Posted June 5, 2013 Share Posted June 5, 2013 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. Quote Link to comment https://forums.phpfreaks.com/topic/278802-semi-login-form-help/#findComment-1434251 Share on other sites More sharing options...
cpd Posted June 5, 2013 Share Posted June 5, 2013 (edited) 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 June 5, 2013 by cpd Quote Link to comment https://forums.phpfreaks.com/topic/278802-semi-login-form-help/#findComment-1434279 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.