can CGI prog activate a pre-built web page
can CGI prog activate a pre-built web page
(OP)
Hello everyone,
I'm sorry to be a pain AND a newbie but rather than create a webpage from the CGI program [dynamic content - as I understand it the reason for CGI] could the program just return a pre-built page. e.g. if the IP of the client HAS previously logged in then the CGI could check his log-in status and if OK point them to a page?
Hmmm! I think I might be missing something here???
Thanks
Ian t
I'm sorry to be a pain AND a newbie but rather than create a webpage from the CGI program [dynamic content - as I understand it the reason for CGI] could the program just return a pre-built page. e.g. if the IP of the client HAS previously logged in then the CGI could check his log-in status and if OK point them to a page?
Hmmm! I think I might be missing something here???
Thanks
Ian t
RE: can CGI prog activate a pre-built web page
The simplest script would check if a user is logged in and allow them access to the site/content if they are, and redirect to a login screen if they are not.
- Kevin, perl coder unexceptional!
RE: can CGI prog activate a pre-built web page
cheers
RE: can CGI prog activate a pre-built web page
CODE
But this does not restrict access, only redirects the user to another site/page.
If you need to restrict access you really need to use some type of authentication, generally a username and a password.
- Kevin, perl coder unexceptional!
RE: can CGI prog activate a pre-built web page
if I understand the question correctly
(I often get confused)
I have a script I downloaded from some free script archive
That allows storage on my site but it makes a pre-set index page for each user
And checks the ip of user to the logged ip but it has a setting to turn this off. Now in my use I did for some people are still on dialup and ip’s change
MA WarGod
I believe if someone can think it, it can be programmed
RE: can CGI prog activate a pre-built web page
As you've probably guessed I am looking at authentication.
Initially the user coming to my site is presented with index.html that is a form for username/password. If nothing is entered or invalid user [checked against a MySQL DB tey get no further.All's well with the universe.
From your prevous answer you've guessed I'm having probs at this point, ie when a valid user comes in. Your first answer mentioned "allow them access to the site/content if they are"
a. how does ths happen and
b. wouldn't I have to force a CGI that checks them on every page they may then visit?
As I'm using Apache I could simply use the built in .htaccess but for purposes of learning I'd rather carry on with my CGI stuff with a lot of help from people like yourself if you don't mind.
Besides I don't like the Log-on screen that .htaccess throws up?!?
hoe you don't mind sharing your knowledge?
Thanks
RE: can CGI prog activate a pre-built web page
I'm using C and I think you're talking Perl or PHP?
RE: can CGI prog activate a pre-built web page
- Kevin, perl coder unexceptional!
RE: can CGI prog activate a pre-built web page
http://www.hotscripts.com/C_and_C++/index.html
there are probably already some C scripts that you could use or modify or learn from.
- Kevin, perl coder unexceptional!
RE: can CGI prog activate a pre-built web page
Cheers, I'll go have a look.