Anders Moen Posted February 14, 2007 Share Posted February 14, 2007 (edited) Hey!What you think of my new CMS system? How does it work? I will put on so you can add comments soon, don't worry.Here's the linkHope you like it!I will just say at once: do not think about how it looks! That was just something I put together in 1,2,3 hehe- Edited March 28, 2007 by Jonas Merged four(4) related topics - all conversation related to moen's CMS quest should only be posted here. Thread title edited per request. Link to comment Share on other sites More sharing options...
justsomeguy Posted February 14, 2007 Share Posted February 14, 2007 It's not bad, but I wouldn't really call it a CMS, it just seems like 5 fields in a database that you enter on one page and display on another. But it's a good way to learn how to use a database with PHP, almost all websites are just data input/output after all. Link to comment Share on other sites More sharing options...
Anders Moen Posted February 15, 2007 Author Share Posted February 15, 2007 Thanks!Yeah, I know...it's a really simple one. But I started with it when I started to learn PHP and MySQL like 2 months ago. Link to comment Share on other sites More sharing options...
Skemcin Posted February 15, 2007 Share Posted February 15, 2007 Everytime I submit, I get:Error: Unknown column 'dato' in 'field list'Required field should be indicated or other restrictions should be communicated.Otherwise a good start on building your own database driven application. Link to comment Share on other sites More sharing options...
Anders Moen Posted February 15, 2007 Author Share Posted February 15, 2007 Oh yeah! I know...I wrote that in the code so I could get the date too, but then I lost my network and it wouldn't come back :S, so I never got the chance to go to phpMyAdmin to make the field date. I'll do it now! Try again Link to comment Share on other sites More sharing options...
Kevin M Posted February 16, 2007 Share Posted February 16, 2007 Good job!I was thinking of making my own sort of thing, but actually more so a webmaster could post news that would show up on a certain page. I'm going to probably use AJAX with it, along with PHP and MySQL.Anyway, good job on it. Link to comment Share on other sites More sharing options...
Anders Moen Posted February 16, 2007 Author Share Posted February 16, 2007 Hehe, it is for other people...if someone hire me to make a brand new website, they probably want some kinda CMS system and if they're happy with mine, I could get lots of money only for that ^^ Money :)I've worked on the system in about 2 months to make it work properly. I just need to fill in one code in view_topic.php so you don't get an MySQL error message if you don't have ?id=number. Link to comment Share on other sites More sharing options...
justsomeguy Posted February 16, 2007 Share Posted February 16, 2007 If you really want to be able to sell this, it will need some work. Right now it's a good example of how to use a database and how to process a form, but that's about it. It would be a good start to something like a guestbook. If you want to make it more then that, the first thing it needs is user login. With the exception of something like a web service, nearly everything you'll build for someone will need a user login system. But you don't have to get complicated with it to start out. The first thing is just to learn about sessions, you don't need a complex database-driven user login system with cookies and whatnot. You can start out by just hard-coding the login info in order to learn about managing the login through sessions. So just hard-code the password in your PHP file: define("ADMIN_PASSWORD", "admin"); Or, if you are concerned about the security if someone reads the code, then hash the password: define("ADMIN_PASSWORD", "d033e22ae348aeb5660fc2140aec35850c4da997"); And then checking the password is this easy: if ($_SESSION['admin_pw'] != ADMIN_PASSWORD){ header("Location: login.php?error=wrong_password"); exit();} So you don't need to get complicated with the login, but you will need a login system one way or the other. Once you get the basics down with sessions, then you can expand your login system to check in a database for one of several users, or use cookies to remember the user, or let users change their password, or whatever else. But if you have a login your system can do a lot more, no one would build a CMS for a website and sell it that doesn't require a login, because anyone could change the website. Or, more precisely, no one would buy that. Link to comment Share on other sites More sharing options...
Anders Moen Posted February 16, 2007 Author Share Posted February 16, 2007 I have an admin page where I already can edit posts and stuff. Link to comment Share on other sites More sharing options...
aspnetguy Posted February 16, 2007 Share Posted February 16, 2007 but how does that protect from anyone getting in and editing your content? Link to comment Share on other sites More sharing options...
justsomeguy Posted February 16, 2007 Share Posted February 16, 2007 Yeah, here me now and believe me later! Sooner or later you will need a login system. Trust me.Hardcore Cat agrees: Link to comment Share on other sites More sharing options...
Sniffy Posted February 16, 2007 Share Posted February 16, 2007 On the column where it shows all of the user entries, it would be great to say who it was submitted by.Test by Sniffy^^Something like that Link to comment Share on other sites More sharing options...
Anders Moen Posted February 16, 2007 Author Share Posted February 16, 2007 Yeah...maybe I should put on "by person"But the login system...don't you think I've made one? Lol...I'm not dumb just because I'm dumb Link to comment Share on other sites More sharing options...
justsomeguy Posted February 16, 2007 Share Posted February 16, 2007 But the login system...don't you think I've made one?Well, no, I didn't think you made one because I didn't see one. Link to comment Share on other sites More sharing options...
Anders Moen Posted February 16, 2007 Author Share Posted February 16, 2007 Oh my god...they're not in the same folder. The login script and stuff is in another folder Link to comment Share on other sites More sharing options...
justsomeguy Posted February 16, 2007 Share Posted February 16, 2007 That's fine. There's no login system protecting the other thing. That's what needs to be changed for you to be able to sell it. Link to comment Share on other sites More sharing options...
Anders Moen Posted February 17, 2007 Author Share Posted February 17, 2007 That site you are on, that's only a testsite. I have the "real" script in another folder, with a login script and more... Link to comment Share on other sites More sharing options...
Anders Moen Posted February 17, 2007 Author Share Posted February 17, 2007 New thing to the system! You can now upload pictures to your testing! Remember to fill out [img=images/name_on_image_you_uploaded.filetype] If the image' name was "W3Schools Forum.gif", you need to fill out the code like this: [img=images/W3Schools Forum.gif] because Linux servers are sensitive on small and big letters, which you probably knew lolIt'll say when you don't have to use images/ but right now I can't do anything...when I can, I will also put on the login script since people obvious is "crazy" about it. Link to comment Share on other sites More sharing options...
justsomeguy Posted February 18, 2007 Share Posted February 18, 2007 I think we're just trying to help you build a better system. I assume you posted the link here for feedback. Link to comment Share on other sites More sharing options...
jlhaslip Posted February 18, 2007 Share Posted February 18, 2007 That makes sense to me, too. Link to comment Share on other sites More sharing options...
Anders Moen Posted February 18, 2007 Author Share Posted February 18, 2007 Okay, since you've been so "crazy" about the login system, I added it! lolTest it again nowUsername: demoPassword: demoJust couldn't be bothered to make a logout link right now, but when you need to log out, just write http://www.andersmoen.hotserv.dk/test/logout.php or click here (I'm not 100 % sure if the last one will work but I guess so) Link to comment Share on other sites More sharing options...
jlhaslip Posted February 18, 2007 Share Posted February 18, 2007 Any hopes of getting a menu set-up on there.I uploaded an image, made a post and then was left there staring at the page with nothing but a back button to use. :)Might be nice to get out of that page. Link to comment Share on other sites More sharing options...
justsomeguy Posted February 18, 2007 Share Posted February 18, 2007 When I left the email blank it didn't give me an error, didn't add the story, and redirected to the index.php page. Link to comment Share on other sites More sharing options...
Anders Moen Posted February 18, 2007 Author Share Posted February 18, 2007 Hmm...can you please just try again? Because that's weird :S - it shouldn't happen.The URL was http://www.andersmoen.hotserv.dk/test/other.php right? Link to comment Share on other sites More sharing options...
justsomeguy Posted February 18, 2007 Share Posted February 18, 2007 It's doing the same thing. Enter a title, a description, I was just using "?" for the name, and leave the email blank and hit submit. It goes back to an empty form and then uses a meta refresh to redirect to the other page.Also, it looks like you were using a meta refresh to check if they were logged in and redirect otherwise. A meta refresh can be disabled, it would be better to send a location header. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now