PHP news system

Status
Not open for further replies.

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 facepalm.jpg) . 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');
    };
?>
 

Gajeel

Well-Known Member
Oct 4, 2011
2,411
413
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 facepalm.jpg) . 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');
    };
?>
Hoping for a banning system! And sounds great, I will use this deffo or atleast make a download for it on my website. :) Goodluck.
 

Sledmur

Web-Developer
Nov 29, 2011
459
98
Hoping for a banning system! And sounds great, I will use this deffo or atleast make a download for it on my website. :) Goodluck.
Thanks! Stuff like this makes me wanna finish it ;)

EDIT: Sessions now work with special thanks to adil YOU CANNOT KILL ME NAO
 

Alam

shietttt
Jul 3, 2011
433
166
You are not quite filtering your fields, this will come across an exploitation.
OFF TOPIC: Since you are new it's not bad keep up the effort.
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
Thread closed, been a few months since a reply from the developer, message me if you require this reopening.
 
Status
Not open for further replies.

Users who are viewing this thread

Top