From 5acb5456ff7359eaabf9b3cbafa74cebfeb19739 Mon Sep 17 00:00:00 2001 From: Nicolas Rannou Date: Thu, 1 Dec 2011 15:04:06 -0500 Subject: [PATCH] WIP: md5 secured passwords --- admin/createDB.php | 14 +++--- body.php | 2 +- index.php | 10 ++++ login.php | 18 +++++-- register.php | 2 + registeredarea.html | 71 +++++--------------------- registeredarea.php | 120 +++++++++++++++++++++++++++++++++++++++++++- 7 files changed, 165 insertions(+), 72 deletions(-) diff --git a/admin/createDB.php b/admin/createDB.php index 94d84f9..25b57b7 100644 --- a/admin/createDB.php +++ b/admin/createDB.php @@ -24,9 +24,9 @@ $sql="CREATE TABLE users( id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), - name VARCHAR(30), - email VARCHAR(30), - password VARCHAR(30))"; + name VARCHAR(100), + email VARCHAR(100), + password VARCHAR(100))"; if (mysql_query($sql, $con)) { @@ -42,10 +42,10 @@ id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), owner INT, - name VARCHAR(30), - modified VARCHAR(30), - type VARCHAR(30), - date VARCHAR(30))"; + name VARCHAR(100), + modified VARCHAR(100), + type VARCHAR(100), + date VARCHAR(100))"; if (mysql_query($sql, $con)) { diff --git a/body.php b/body.php index 02f6747..5ce511b 100644 --- a/body.php +++ b/body.php @@ -1,6 +1,6 @@ -
+
diff --git a/index.php b/index.php index 0f3549e..9af0c67 100644 --- a/index.php +++ b/index.php @@ -1,3 +1,13 @@ + + diff --git a/login.php b/login.php index 2113dcb..e9bb9e4 100644 --- a/login.php +++ b/login.php @@ -1,4 +1,8 @@ "; + exit; + } + } + + // if the session is not registered + if(session_is_registered("myusername") == false) { + echo "Session is not registered, please log in"; + echo ""; } ?> \ No newline at end of file diff --git a/register.php b/register.php index 90add59..99fc736 100644 --- a/register.php +++ b/register.php @@ -29,6 +29,8 @@ $mypassword = mysql_real_escape_string($mypassword); $myemail = mysql_real_escape_string($myemail); + $mypassword = md5($mypassword); + // $sql="select COUNT(*) from users where name='$myusername'"; $result = mysql_query($sql, $con); diff --git a/registeredarea.html b/registeredarea.html index a69cde3..6f0790d 100755 --- a/registeredarea.html +++ b/registeredarea.html @@ -1,3 +1,11 @@ +"; +} +?> + jQuery Dock from Queness WebBlog @@ -5,36 +13,17 @@ - - - + + + + +
+
+

Default options

+
+
+
+ + + + \ No newline at end of file