I'm wanting to make a simple dummy login page (like the one in earlier in this thread) and simply want to set it up so that regardless of what details a user puts in, a dialog box appears saying that the username/password entered is incorrect and that they should contact the administrator for the correct details.
can you please tell me the code so that I can use it. Much appreciated.
also I'd like to change the font that would appear on the login button.
I'm wanting to make a simple dummy login page (like the one in earlier in this thread) and simply want to set it up so that regardless of what details a user puts in, a dialog box appears saying that the username/password entered is incorrect and that they should contact the administrator for the correct details.
can you please tell me the code so that I can use it. Much appreciated.
also I'd like to change the font that would appear on the login button.
thanks
Wow am I the only one who thinks that sounds like someone is trying to illicitly capture other people's passwords??? Here's a better idea. Forget about it and stop trying to hack others' accounts.
"Why must I be surrounded by frikkin' idiots?!" - Dr. Evil
"Remember: There are no stupid questions, only stupid people." - Mr. Garrison
Yeah, I know. I made this just for fun, not for something secure. I don't have my own domain, so I am not able to use sercure server-side scripting. I put this in an external JS, just to keep amateurs out. Anybody else could get in.
where do I place the external JS to make this work?
Wow am I the only one who thinks that sounds like someone is trying to illicitly capture other people's passwords??? Here's a better idea. Forget about it and stop trying to hack others' accounts.
i dont think he trying to hack it. like me i know that u put your page site url in there some where but where do u put it so it can work right i think he was tryin to test it to see if it work right its not like it got url go here or email go there what i need to know is how to do the login html the sing up html and a html for if they for get there password my site will send it to them
this is the simple way to create a login form using HTML & PHP,
<?php
session_start();
# DISABLE REGISTER GLOBALS IF CONFIGURED IN PHP.INI
ini_set('register_globals', false);
############################# COPYRIGHT ###################
######### This script is release under GPL/UGN Copyright Rules
######### Script by www.webune.com
######### Please do not remove this message. Thanks.
echo'
<div style="float:left;padding-left:10px;">
<a href="http://www.webune.com">
<img src="http://www.webune.com/images/headers/default_logo.jpg" border="0" align="Webune Logo">
</a>
</div>
<h1 style="float:left">Login Form Example</h1>
<div style="clear:left;"></div>
<hr />';
$Warning = '<hr>
<div style="font-weight:bold; color:#FFF; font-size:18px; background-color:#F00">
IMPORTANT: Please use this script only for learning purposes.
Under no circumstances use this exact code to implement on a production website.
This script is NOT SECURED!!! This script lacks many security rules and guidelines to implement on a live website.
Again, Use this script for learning purposes.
If you need to learn more about login and password security, visit us at www.webune.com.
Thank You for trying our script.
</div>';
if($_GET['logout'] == 'yes'){
$_SESSION['ConfigUserSess'] = '';
$_SESSION['ConfigPasswdSess'] = '';
echo '<div style="font-weight:bold; color:#060; font-size:18px; text-align: center;" >Congratulations!!!<br><br>
**** You Are Now Logged Out ****</div><br><br>
Visit <a href="http://www.webune.com">Webune.com</a> For more Tutorials Like This<br><br>
<a href="'.$_SERVER['PHP_SELF'].'">Click Here To Login Again</a>'.$Warning;
exit;
}
#### CONFIGURE ####
# WHEN THE USER SUBMITS THE FORM. THESE VALUES MUST MATCH
$ConfigUser = 'foo';
$ConfigPasswd = 'secret';
#### STOP CONFIGURE ####
if($_SESSION['ConfigUserSess'] == $ConfigUser && $_SESSION['ConfigPasswdSess'] == $ConfigPasswd){
# THE USER IS ALREADY LOGGED IN
echo '<div style="font-weight:bold; color:#060; font-size:18px; text-align: center;">
Congratulations !!! - You are already logged in. </div><br>
<a href="'.$_SERVER['PHP_SELF'].'">Click Here To Continue</a><br><br>
<a href="'.$_SERVER['PHP_SELF'].'?logout=yes">Click Her To Logout</a>'.$Warning;
}else{
# FUNCTION TO DISPLAY LOGIN FORM AND ERROR MESSAGES
function LoginForm($Errors){
# DISPLAY ANY ERRORS IN RED COLORS
echo '<div style="color:red;">'.$Errors.'</div>';
?>
<form name="form1" method="post" action="">
<p>Username:
<input type="text" name="LoginName">
[ Enter: foo ]
</p>
<p>Password:
<input type="password" name="UserPassword">
[ Enter: secret ]
</p>
<p>
<input type="submit" name="Login" value="Login">
</p>
</form>
<?php
}
# CHECKS IF LOGIN FORM HAS BEEN SUBMITTED
if(isset($_POST['Login'])){
# CHECK IF USERNAME AND PASSWORD MATCH WITH CONFIGURATION
if(!$_POST['LoginName'] || !$_POST['UserPassword']){
LoginForm('ERROR: All Fields Are Required.');
}else{
if($_POST['LoginName'] == $ConfigUser && $_POST['UserPassword'] == $ConfigPasswd){
# USERNAME AND PASSWORD MATCH. GIVE USER COOKIE TO LOG USERNAME AND PASSWORD
$_SESSION['ConfigUserSess'] = $ConfigUser;
$_SESSION['ConfigPasswdSess'] = $ConfigPasswd;
echo $_POST['user'].'<div style="font-weight:bold; color:#060; font-size:18px; text-align: center;" >
Congratulations !!! - IT WORKS !!! You are already logged in.</div><br>
<a href="'.$_SERVER['PHP_SELF'].'">Click Here To Continue</a><br><br>'.$Warning;;
}else{
# USERNAME AND PASSWORD DO NOT MATCH. - SHOW FORM
LoginForm('ERROR: Your Username and Password Do Not Match.<br>Try Again.<br>
Username: foo<br>Password: secret<br>');
}
}
}else{
# FORM HAS NOT BEEN SUBMITTED. SHOW LOGIN FORM
LoginForm('All Fields Are Required - You are Not Logged In.');
}
}
?>
Bookmarks