how do i get a login fourm so people can login? please help:confused::eek::(:confused:
Printable View
how do i get a login fourm so people can login? please help:confused::eek::(:confused:
a real one!
Like a restricted area for members to log into? Usually you'll need a server-side language to process the login. I'm not exactly sure what you mean by "a real one"...
like on... for example you can log in on this site! how do you do that?
Oh, and by a real one, I meant one that works.
so my website has a point!
(if you want to see it you can just coppy this code and veiw it)
(it's not finished)
/<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link id="ctl00_Imports" rel="stylesheet" type="text/css" href="../CSS/AllCSS.ashx?v=19" />
<link rel="icon" type="image/vnd.microsoft.icon" href="../favicon.ico" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="en-us" />
<meta name="author" content="ROBLOX Corporation" />
<meta name="description" content="Free Games and Building Games! A virtual world for kids with user-created castles, cars, spaceships, swords, battles, trucks, zombies and awesome destruction. Build, battle, chat, or just hang out online." />
<meta name="keywords" content="free games, online games, building games, virtual world" />
<title>ilikepie.com - all games</title>
<script type="text/javascript">
var c=0
var t
function timedCount()
{
document.getElementById('txt').value=c;
c=c+1;
t=setTimeout("timedCount()",1000);
}
function stopCount()
{
clearTimeout(t);
}
function getCookie(c_name)
{
if (document.cookie.length>0)
{
c_start=document.cookie.indexOf(c_name + "=");
if (c_start!=-1)
{
c_start=c_start + c_name.length+1 ;
c_end=document.cookie.indexOf(";",c_start);
if (c_end==-1) c_end=document.cookie.length
return unescape(document.cookie.substring(c_start,c_end));
}
}
return ""
}
function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : "; expires="+exdate.toGMTString());
}
function checkCookie()
{
username=getCookie('username');
if (username!=null && username!="")
{
alert('Welcome again '+username+'!');
}
else
{
username=prompt('Please enter your name:',"");
if (username!=null && username!="")
{
setCookie('username',username,365);
}
}
}
</script>
<style type="text/css">
a:link {color:#000000} /* unvisited link */
a:visited {color:#000000} /* visited link */
a:hover {color:#00FF00} /* mouse over link */
a:active {color:#000000} /* selected link */
body {
background-image: url(xat_pool.jpg);
background-repeat: repeat-w;
}
table {
background-color: #fff;
}
.chris {
background-image: url(keys_02.png);
background-repeat: no-repeat;
display: block;
width: 32px;
height: 32px;
margin: 0 0 0 40px;
}
</style>
</head>
<body>
made by christopher creguer
<font face="Tahoma"><a target="_blank" href="http://www..com/">
<span style="font-size: 8pt; text-decoration: none"></span></a></font>
<script type="text/javascript">
function show_alert()
{
alert("you should feel ashamed of yourself!");
}
</script>
<body onload="checkCookie()">
<center>
<div id="page">
<div class="ad">
<table width="76%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="18%">
<center><h1><font size="2" face="Verdana"><font size="2" face=
"Verdana"><font size="2" face=
"Verdana"><h1><u></u></h1>
<fieldset class="form_box">
<table align="left" border="38" cellpadding="1" cellspacing="90">
<tr>
<td width="85%">
<span style="font-family:Cursive;font-size:41px;color:orange;font-style:italic;font-weight:normal;" />
i like pie .com <img alt="ilikepiealot (3K)" src="ilikepiealot.jpg" height="97" width="130" />
<div class="button2">
<form>
<input type="button" value="Start count!" onClick="timedCount()">
<input type="text" id="txt"><input type="button" value="Stop count!" onClick="stopCount()"><P>
</form><input type="button" onClick="show_alert()" value="please do not press this button!" /></form>
<div style="border: 1px solid black;"></div>
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/BF8OcjLf6Dw&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/BF8OcjLf6Dw&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>
<form>
<img alt="age of war (2K)" src="age%20of%20war.jpg" height="60" width="80" /><P><a href="age%20of%20war.htm">age of war</a></p>
<img alt="g724 (1K)" src="/Documents%20and%20Settings/Christopher/My%20Documents/my%20html/g724.gif" height="60" width="80" /><p><a href="/Documents%20and%20Settings/Christopher/My%20Documents/my%20html/cyclo%20maniacs.htm">cyclo maniacs</a></P>
<img alt="defend your honor (5K)" src="defend%20your%20honor.gif" height="60" width="80" /><a href="defend%20your%20honor.htm"><P>defend your honor</u> </a></P>
<img alt="bowmaster (1K)" src="bowmaster.gif" height="60" width="80" /><a href="bowmaster.htm"><P>bowmaster</a><P/>
<img alt="bloons (2K)" src="bloons.gif" height="60" width="80" /><a href="bloons.htm"></P>bloons</a></p>
<img alt="bloons td 4 (1K)" src="bloons%20td%204.gif" height="60" width="80" /><a href="bloons%20td%204.htm"><p>bloons td 4</a></P>
<img alt="color stripe (1K)" src="color%20stripe.jpg" height="60" width="80" /><P><a href="art%20painter.htm">art painter</a></P>
<img alt="spank the monkey (2K)" src="spank%20the%20monkey.jpg" height="60" width="80" /><P><a href="slap%20the%20monkey.htm">slap the monkey</a></P>
<img alt="street racer (2K)" src="street%20racer.jpg" height="60" width="80" /><P><a href="street%20racer.htm">street racer</a></P>
<img alt="advanced ninja (1K)" src="advanced%20ninja.jpg" height="60" width="80" /><P><a href="advanced%20ninja.htm">advanced ninja</a><P/>
<img alt="ragdoll volleyball (1K)" src="ragdoll%20volleyball.jpg" height="82" width="82" /><P><a href="ragdoll%20volleyball.htm">ragdoll volleyball</a></P>
<img alt="play for your clum (2K)" src="play%20for%20your%20clum.jpg" height="77" width="116" /><P><a href="play%20for%20your%20club.htm">play for your club</a></P>
<img alt="street sesh (3K)" src="street%20sesh.jpg" height="96" width="127" /><P><a href="street%20sesh.htm">street sesh</a></p>
<img alt="gecko (2K)" src="gecko.jpg" height="85" width="77" /><P><a href="gecko%20skateboarding.htm">gecko skateboarding</a></p>
<img alt="short circut pinball (2K)" src="short%20circut%20pinball.jpg" height="60" width="104" /><p><a href="short%20curcuit%20pinball.htm">short circut pinball</a></p>
<img alt="kickflip game (2K)" src="kickflip%20game.jpg" height="111" width="111" /><P><a href="kickflip%20game.htm">kickflip game</a></p>
<img alt="castle clout (1K)" src="castle%20clout.jpg" height="82" width="82" /><P><a href="castle%20clout.htm">castle clout ROTK</a></P>
<h3><h3><p>
<center>
</center><fieldset>
</menu></fieldset>
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['aspnetForm'];
if (!theForm) {
theForm = document.aspnetForm;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</script>
</center>
<ul class="noindent">
</ul>
<form>i like pie .com
</form>
</center>
</td>
</tr>
</table>
</td>
</td>
</tr>
</table>
</body>
</html>
i feel like i'm talking to a wall!
oh sorry your message just appeared after i sent mine. thanks.
You can use MS Front Page to create a web page with login form. However, I think you need to know about database to make "a real one". To make a simple website with login form, you can use Wordpress ( http://wordpress.org )
thanks but what page would i go to?|
Here you are, a simple but effective login. If you're looking for a more complex example, you can find someone on the forum to build you one. Might cost you a couple bucks, but it's always easier than DIY!
processLogin.php
login.htmlCode:<?php
// entered is grabbed from previous page, reuiqred is hardcoded (or grabbed from database)
$passwordEntered = $_REQUEST['password'];
$passwordRequired = "yourpass"; // This is where you'd make your sql statement, comparing the users name to the password given for the users in your database
if($passwordEntered == $passwordRequired)
echo "Success";
//login is a successs
else
echo "failure";
//failure{
?>
I originally had some JS validating the password, and the username, but you get the idea!Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Your Title</title>
</head>
<body>
<form name="myFrm" method="POST" action="processLogin.php">
<input type="password" id="password" name="password" />
<input type="submit" value="Submit"/>
</form>
</body>
</html>
Very simple, yet effective if you're using it for personal reasons. Otherwise look into using cookies, or sessions.
you need to code a login form in a particular programming language that your server supports and connect with a database server.
Right you are. PHP, is my mama.
I already provided some code on how to confirm a "static password test". Heres a more dynamic version, in which you must use mysql to create a db, assign usernames and passwords (can be done with another form and another query) and validate them based on a query.
Code:session_start();
// Get/Post Username/Password
$username = $_REQUEST['username'];
$password = $_REQUEST['password'];
// Connect & Query MySQL
include('connection.php');
// $query = "SELECT * FROM user WHERE id = '$username' AND password = md5('$password')";
$query = "SELECT * FROM user WHERE username = '$username' AND password = md5('$password')";
$result = mysql_query($query);
// Login, only if 1 result
if(mysql_num_rows($result) == 1){
session_regenerate_id();
$user = mysql_fetch_assoc($result);
$_SESSION['SESS_USER_ID'] = $user['username'];
$_SESSION['USER_NAME'] = $user['firstName']." ".$user['lastName'];
header("location: uploadFile.php");
exit();
}
else{
header("location: access-denied.php");
}