• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Well Im an Idiot

lotsofissues

New Member
I can't even find scripts!!!-- muchless make them.

I was looking through www.hotscripts.com and I couldn't even find a free login manager. Can anyone help?

Also it would be helpful to find a script for the user to take tests and have those tests recoreded into a history. Does anyone think this item can be found for free?
 
how do you want your user to login?
.htaccess?

here is the script create logins: You will need to edit the .htpasswd file manually when you want to delete user... I did not include that part in the script...


Code:
#!/usr/bin/perl
use strict;
use CGI qw(:standard :form);


my $htpasswd	=	q(.htpasswd);
my $script_name	=	q(script.pl);
my $query	=	new CGI();
my $username	=	$query->param('username');
my $password	=	$query->param('password');
my $stage	=	$query->param('stage');
my $content;


if($stage eq 'add_user') { &add_user; }
else { &index; }


sub index {
	$content .= qq(
		<FORM METHOD="POST" ACTION="$script_name">
		<INPUT TYPE="HIDDEN" NAME="stage" VALUE="add_user">
		Username <INPUT TYPE="TEXT" NAME="username"><BR>
		Password <INPUT TYPE="TEXT" NAME="password"><BR>
		<INPUT TYPE="SUBMIT" VALUE="Create">
		</FORM>
	);
}


sub add_user {
	open(HTPASSWD,">>$htpasswd") or die print "Error opening htpasswd $htpasswd: $!\n";
		print HTPASSWD join(":",$username,crypt($password,'MD'))."\n";
	close(HTPASSWD);
	$content .= "New user has been added :)\n";
}

sub PRINT {
	print "Content-Type: text/html\n\n";
	print qq~
	<HTML><HEAD><TITLE>Create User Script</TITLE></HEAD><BODY>
	~;
	print $_[0];
	print qq~
	</BODY></HTML>
	~;
}

PRINT($content);


__END__
 
Last edited:
Back
Top