Jump to content

CMS and Personal Website feedback


Anders Moen

Recommended Posts

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 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

  • Replies 189
  • Created
  • Last Reply

Top Posters In This Topic

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

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

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

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

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

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

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

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

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

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

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...