Jump to content
xisto Community
FaLgoR

Login System Lets do it :)

Recommended Posts

lines 5-10

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">[/br]<link href="../style.css" rel="stylesheet" type="text/css">[br]<title>SPONK INDUSTRIES - LOGIN</title>[/br]<style type="text/css">[br]<!--[/br].style1 {

 

Is there any way to stop Dreamweaver MX 2004 putting in styles automatically, all the font sizes are pixels now :)

<{POST_SNAPBACK}>


Dreamweaver is actualy trying to maintain compatibility with W3C standards. In HTML 4.01, styles do most of the config, and some tags have lost their properties, like <TD> losing it's BGCOLOR property.

 

So, every time you change a font, font size or color, Dreamveawer will create a new style... I don't think it is possible to disable DW to add styles; you'll probably have to delete them manualy.

 

Oh, and... Great login code, helped me in making my own :rolleyes: Thanx FaLgoR

Share this post


Link to post
Share on other sites

Add some RegEX (Regular Expression) to verify the informations :rolleyes:
Use it like this :)

[br]// Checking to see if the characters of the pseudo are valid[/br]if (preg_match("!^[a-zA-Z0-9_-]{4,14}$!", "$pseudo"))[br]{[/br]// Checking to see if the email is valid[br]if (preg_match("!^[a-zA-Z0-9._-]+@[a-z0-9._-]{2,}\.[a-z]{2,4}$!", "$email"))[br]{[/br]// Checking to see if the characters of the password are valid[/br]if (preg_match("!^[a-zA-Z0-9_-]{4,14}$!", "$password"))[br]{[/br]...[br]}[/br]else[br]{[/br]?>[br]Invalid password[/br]<?[br]}[/br]}[br]else[br]{[/br]?>[/br]Invalid email[br]<?[br]}[/br]}[br]?>[/br]Invalid name[/br]<?[br]}[/br]<?[br]}[/br]
With this one you can't register a pseudo with letters like $*¤}, etc...
Then you can't insert HTML or PHP into the form :)

Share this post


Link to post
Share on other sites

Ok, im having ploblems with the login page, Ive looked at it, but nothing seems to be wrong (not to me anyway)


Here is the code in login.php

<?include("conn.php");if($do_login){$login = stripslashes($login);$passwd = stripslashes($passwd);$check = mysql_query("SELECT * FROM members WHERE login='$login' LIMIT 1;");$user = mysql_fetch_array($check);if($user[password] == md5($passwd)){setcookie("login","$login",time()+360000);setcookie("pass","$passwd",time()+360000);header("Location: userspage.php");}else{print "Username or password incorrect!\n";exit;}}?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://forums.xisto.com/no_longer_exists/ http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Toxic Sims</title></head><body><span class="style1">LOGIN</span><form action="login.php" method="post"><table border="0" cellspacing="0" cellpadding="0">  <tr>    <td><span class="style4">Username:</span></td>    <td><input type="text" name="login"></td>  </tr>  <tr>    <td><span class="style4">Password:</span></td>    <td><input type="password" name="passwd"></td>  </tr>  <tr>    <td> </td>    <td><input type="submit" name="do_login" value="LOG IN!"></td>  </tr></table></form></body></html>

The registration page works, but whenevey I try to login it says, 'Username or password Incorrect!'


the info is correct and conn.php has the correct info in it too...


What is wrong? have I put the php code in login.php in the wrong place or something?


Thank you,

Craig.

Share this post


Link to post
Share on other sites

I have never workes with mySQL in the past, what do you mean by 'md5'????

 

Sorry for being such a n00b!

41668[/snapback]

It can hash a password :rolleyes: (azerty = 16vfd54rz8g4esh68rthr (something like it :) ))

Share this post


Link to post
Share on other sites

md5 is an encrypted code. just check the database. If you see: yourpassword its wrong. If u see gt5rgtregtrhr897hterh9treh7trehtrhtr98 it's right! :D~i've changed the registration page because it was not encripting the passwords, so maybe u register with the old page and its not encripting. Try to register again with this new registration code. P.S. dont kick yourself because u did never work with mysql, nobody were born knowing it :/\_

Share this post


Link to post
Share on other sites

YES! My fault, I didnt think you updated that page... :rolleyes:ALL working now, its just my other site, thats a fault of my host, (Not Xisto) I think...Ill update those files and upload them... then ill post here if I cant find a problem...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.