English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

In my quest to learn Php I have another task but I've hit a block.

What I am trying to do is have a resume put online BUT when someone clicks on this html button to go to my resume page they are given a password prompt. What I want is that if they enter the correct password the resume page displays and if not then an error message appears. I am trying to do this with Php. The thing I can't get around or at the moment can't think of is how can I prevent the user from just typing in the url of the resume page and thus going around my password check? I thought about having the resume as an "include" to another file but if the user does a "view source" they can still see the resume file name. Any suggestions? Maybe I'm approaching this wrong or missing the obvious?

2007-03-27 16:42:00 · 4 answers · asked by Anonymous in Computers & Internet Programming & Design

4 answers

what you need to do is either password protect a directory using htaccess (or whatever the microsoft equivalent is, but i dont like IIS)

...or, using PHP solely, you create a web form that submits the information to a page. if the page likes the info that was sent, it creates a "php session" and then sends you to a page that you can only get to if you have a valid PHP session.

if a person directly types in the URL, but there is no session, you can code the page to forward them back to the logon form.

2007-03-27 16:57:47 · answer #1 · answered by Anonymous · 2 0

Or you could use PHP Sessions to keep track of if the user has entered the correct password or not, and only allow the resume to show up if they have entered the password.

2007-03-28 02:33:47 · answer #2 · answered by bjnksp 2 · 0 0

Instead of just passing the user the page URL, use file_get_contents() or readfile() to read in the resume from a protected directory and display it.

2007-03-27 17:11:38 · answer #3 · answered by injanier 7 · 0 0

personal residing house web page (personal residing house web page: personal residing house web page) is an open-source, reflective programming language. initially designed as a intense factor scripting language for generating dynamic web pages, personal residing house web page is used specially in server-aspect application application. ...and about personal residing house web page mailer i don't understand what that's. i have never heard of it. View the source for extra archives.

2016-12-02 22:26:35 · answer #4 · answered by Anonymous · 0 0

fedest.com, questions and answers