View Full Version : login System
Badfish
10-11-2004, 08:13 PM
Whats the code that makes a messege come up when someone trys to login but forgets to put in a login name or password? i want a messege to come up saying put in a loginname or password. Whats the code?
Erikina
10-12-2004, 08:12 AM
A javascript thing? This should work.
<html>
<head>
<title>Erikina Rules</TITLE>
<SCRIPT >
function validate() {
mNv=mainform.Name.value;
if (mNv=='') {
alert('Your name is a required field. Please try again\n\n BTW Erikina Rules.');
event.returnValue=false;
}
}
</SCRIPT>
</HEAD>
<BODY>
<FORM NAME="mainform" ACTION="http://www.yoursite.com/script.php" METHOD="post" onsubmit="validate();">
<INPUT TYPE="TEXT" NAME="Name">Please enter your username: (required)
<BR>
<INPUT TYPE="SUBMIT">
</FORM>
</BODY>
</HTML>
Badfish
10-12-2004, 12:18 PM
I tried putting it on my site.
http://www.freewebs.com/majestygaming/mh.htm
(note this page is only up for show, you can't login or anything.)and it still does not work. I tried jsut taking the Script in your code but that does not work etheir. Please help.
Badfish
10-12-2004, 02:52 PM
Someone please help!
Erikina
10-12-2004, 04:05 PM
Correct me if I'm wrong but the script isn't in your page...
---
<html>
<body text="#fffff" bgcolor="black">
<style type="text/css">
a:link,
a:visited {
color: #ffff00;
}
</style>
<head>
<title>Medieval Heroes</title>
</head>
<center>
<img src="http://img.photobucket.com/albums/v351/pride2/medievalheroes.gif">
<h3>Version 1.0 Beta</h3>
</center>
<table border="3" bordercolor="#c0c0c0" bgcolor="#696969">
<tr>
<td><form action="http://www.freewebs.com/medievalheroes/cityhome">
<b>Username:</b>
<input type="text" name="LoginName" value="" size="10" maxlength="40">
<b>Password:</b>
<input type="password" name="LoginPassword" value="" size="10" maxlength="40">
<input type="submit" class="Button" value="Login" name="Login">
<h3><a href="http://www.freewebs.com/medievalheroes/register">Register a New Hero</a>
<br><br>
<a href="http://www.s6.invisionfree.com/medieval_heroes">Visit are Forum</a></h3>
<td><h1>Hello World!</h1>
<font size="4">
<p>Hello and welcome to Medieval Heroes! Medieval Heroes is a Role-Playing-Game based off the medieval world. You'll explore places from Forest, to having a nice visit with the King. But be aware of the dangers in the medieval world, like Zombies, Evil Wizards, and Black Knights!</p>
<p>So now join in and explore the Medieval world!</p>
</form>
</font>
</td>
</tr>
</table>
<font color="#ffff00">
<center>
<a target="_blank" href="http://www.cyberlore.com/Majesty/index.htm">Majesty</a> and all related logos, characters, names, and distinctive likeness thereof (C) 2000
<a target="_blank" href="http://www.cyberlore.com">Cyberlore Studios, Inc.</a>
<a target="_blank" href="http://www.cyberlore.com/Majesty/index.htm">Majesty*</a> is a trademark of
<a target="_blank" href="http://www.cyberlore.com">Cyberlore Studios, Inc.</a> Cyberlore is a registered trademark of
<a target="_blank" href="http://www.cyberlore.com">Cyberlore Studios, Inc.</a>
<a target="_blank" href="http://www.cyberlore.com/Majesty/index.htm">Majesty</a> is published by Hasbro Interactive, Inc. All rights reserved. All
<a target="_blank" href="http://www.cyberlore.com/Majesty/index.htm">Majesty</a> materials used on this page are used with kind permission of
<a target="_blank" href="http://www.cyberlore.com">Cyberlore Studios, Inc.</a><br><br>
</body>
</html>
Badfish
10-12-2004, 04:11 PM
I know I took it out. Do you think you can add it to my form in there? I can't seem to figer it out.
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.