Sledmur
Web-Developer
- Nov 29, 2011
- 459
- 98
Hey guys!
While learning php i've learned how to create some things, edit some things, and even delete some things (on accident of course ) . Well im learning how to use sessions and so I thought what better to do then make a simple news cms?
Features -
-Sessions
-Facebook Comments
-Admin login
-Images
-Medium sexy design
-Security
Debating to add -
-Non-Facebook comments
- Ability to upload videos? ( Gotta find out how to do this correctly)
- Easily editable templates....
Ideas:
Post em below?
Progress:
Working on my sessions, cant get em to start or do anything? D:
Logincheck.php
While learning php i've learned how to create some things, edit some things, and even delete some things (on accident of course ) . Well im learning how to use sessions and so I thought what better to do then make a simple news cms?
Features -
-Sessions
-Facebook Comments
-Admin login
-Images
-Medium sexy design
-Security
Debating to add -
-Non-Facebook comments
- Ability to upload videos? ( Gotta find out how to do this correctly)
- Easily editable templates....
Ideas:
Post em below?
Progress:
Working on my sessions, cant get em to start or do anything? D:
Logincheck.php
PHP:
<?php
session_start();
if(isset($_POST['submit'])) {
$username = $_POST['username'];
$password = $_POST['password'];
$hashedpass = md5($password);
};
$query = mysql_query("SELECT * FROM admins WHERE name = '" . $username . "' AND password = '" . $hashedpass . "' LIMIT 1");
if (!$query) {
echo 'Username/Password incorrect!';
} else {
$_SESSION['username'] = $username;
$_SESSION['timestamp'] = time();
header('Location: /index.php');
};
?>