sorry if this isn’t the appropriate spot for this kind of questions - feel free to move it if somewhere else is more appropriate.
Ok - workin on a website for someone and he wants certain info
on the site to be password protected. I think he wants to assign a username and password to people doing his training course. so nobody would be signing up for a password online and there will need to be a database as there’ll be more than one password involved. He wants it set up so that there is some info viewable on the page to anyone, but for the remainder of the details to only be seen when the user logs in.
Problem is, i know nothing about PHP and online databases (i’ve had a bit of experience with semi-complex MS Access databases but that doesn’t really help me as i don’t have the option of using an access database for this website anyway)
The webhost the site will be established on has a PHP setup utility that enables me to fairly easily create a database, so as long as i know what to do, that’s not a huge problem.
I have looked at a couple of free scripts online for this kind of thing but because i have no idea what i’m doing, i’ve discovered I can’t fumble my way though it as I tend to do with a lot of things I play with.
can anyone point me to some help…? I know there are sites out there, and scripts you can download etc…but they all assume you have a certain amount of knowledge to begin with.
I do intend to learn php & database stuff from scratch some day, but that’s not going to help me when i need to get this up and running within a week or two.
the site you recommended does seem like a good site, and that’s where i started out, and that’s where i ran into the problem of people assuming you already know how to do this stuff
That’s going to be complicated to do if you don’t know any PHP. If your deadline isn’t really, really soon and you know how to program in general, maybe learning PHP isn’t a bad idea – it’s simple as far as scripting languages go.
To do the job securely you’re going to have to learn how to do cookies and session management and all kinds of tedious things. Really.
Maybe another option is duplicate content – one for unregistered users, and another, duplicate hierarchy for registered users. To try to avoid content duplication between registered and unregistered, you could write the “free” stuff for the unregistered users, and use the PHP include() function (or its brothers) in the paid content to include the free stuff.
You can protect the paid content hierarchy with a “.htaccess” file on the Apache-based web server – google "htaccess authuserfile” for some info and how to set that up.
I know its sounds like you’re already there, but I wanted to add that PHP 4 has a built in Sessions function that you should utilize for this, though explaining how to do it would be a big challenge on a forum like this.