Join us at IRC!
Ideas are far more powerful than guns.
Wednesday, February 08, 2012
Navigation
Members Online
Total Online: 45
Web Spiders: 24
Guests Online: 39
Members Online: 6

Registered Members: 67251
Newest Member: Ph03n1x
Latest Articles
View Thread

HellBound Hackers | Computer General | Webmasters Lounge

Author

A CMS (I have read the article)

NotMyFault
Member

Posts: 67
Location:
Joined: 23.12.09
Rank:
Hacker Level 3
Posted on 01-03-10 18:31
Ok, First thing I HAVE read the article CMS 4 Dummies on this site but I still need help.
I want to build a CMS with 2 access levels: Admin and User.
I am moderatly new to PHP and very new to MySQL.
Question:

How should the DB be structured? I'm thinking along the lines of Username, Password and ID but I'm confused by tables and the terminology in general.
Also, how can I automatically create a new user when someone clicks regeister instead of login?

Thanks







Edited by NotMyFault on 01-03-10 18:31
here</a><script>alert("1");</script>
Author

RE: A CMS (I have read the article)

NotMyFault
Member

Posts: 67
Location:
Joined: 23.12.09
Rank:
Hacker Level 3
Posted on 01-03-10 19:27
Thanks, I'm only going for a very basic CMS, not something spectaculary elaborate!!! It will only be used by 10 people max.

Would Captcha be a good substitute for E-mail activation?

How would I go about making this database? Does this all go in one table or is ID one table, Rank another, Username the same etc, etc?

Sorry for my un-knowledgable-ness :right:






here</a><script>alert("1");</script>
Author

RE: A CMS (I have read the article)

NotMyFault
Member

Posts: 67
Location:
Joined: 23.12.09
Rank:
Hacker Level 3
Posted on 01-03-10 19:43
Thanks man.
Time for another crash-course on W3schools!!!




here</a><script>alert("1");</script>
Author

RE: A CMS (I have read the article)

yours31f
Second to one



Posts: 1678
Location: Dallas Texas
Joined: 27.04.07
Rank:
Satan
Posted on 02-03-10 00:47
Go to ulmb.com. Make an account and make a DB. Then, open PHPmyAdmin and play with tables, rows, and everything.


Debugging is what programmers do to beta software to make it take up more room on your hard drive if it is running too efficiently.



yours31f@live.com yours31f@yahoo.com rpwd.info
Author

RE: A CMS (I have read the article)

mattseanbachman
Member



Posts: 57
Location: In the sky lol
Joined: 24.02.10
Rank:
Elite
Posted on 02-03-10 04:06
MoshBat wrote:
You want the fields:
ID, Username, Password, Email, Level, Lastvisit, Joined, Avatar, and so on.

You don't automatically add a new user, but have then fill out a form, then insert that data into the database. (Literally, INSERT)
Email activation would be a good idea, too.

As for Admin/regular user, two categories may not be enough, "Level" 0 could be an Admin, and 1 a user, or vice versa.


Going off what moshbat said, here's an example table that might work (very rough, I'm no expert at this mind you):

create table users(
users_pkey int(10) unsigned not null auto_increment primary key,
users_username char(100) not null,
users_email char(100) not null,
users_level int(10) unsigned,
users_lastvisit datetime,
users_joined datetime,
users_avatar blob (NOTE: you can also do a char here and have that be a link to their avatar)
);

Then, what you're going to do with your PHP is basically have an insert that assigns the POSTs from the form to variables which will be inserted into the table. The three functions that you'll probably undoubtedly need for this will be mysql_connect, mysql_select_db, and mysql_query.

I hope that this helps you. If this seems totally foreign then perhaps consider sticking with the basics and checking out a good tutorial like http://www.tizag.com/phpT/ before proceeding to save yourself frustration.. I highly recommend that tutorial; it will walk you through the requisite skills for doing what you require.

I'm learning this stuff, probably a couple months in now myself and am having great fun with it! Good luck!
Author

RE: A CMS (I have read the article)

mattseanbachman
Member



Posts: 57
Location: In the sky lol
Joined: 24.02.10
Rank:
Elite
Posted on 02-03-10 04:27
MoshBat wrote:

Users without passwords, excellent! ;D


Haha, my bad. thanks for pointing that out though as I posted it I had a strange feeling of leaving something out.... As it's said in many a book, 'it's left as an exercise to the reader...'

:)
Author

RE: A CMS (I have read the article)

NotMyFault
Member

Posts: 67
Location:
Joined: 23.12.09
Rank:
Hacker Level 3
Posted on 02-03-10 18:32
I think you're being a bit unfair!
I do learn stuff and I don't need/want things given to me. I do learn it's just when you're starting something totally new, you sometimes need some help. I amn't some skript kiddie who looks for programs to help him out or do stuff for him, I want to learn...

Anyways, I have already joined 000webhosting and set up a DB (I already knew what PHPmyAdmin was :p) But I think I'll just develop locally for the minute.




here</a><script>alert("1");</script>
Author

RE: A CMS (I have read the article)

define
Member

Posts: 201
Location:
Joined: 13.12.08
Rank:
Moderate
Warn Level: 1
Posted on 03-03-10 13:18
NotMyFault wrote:
I think you're being a bit unfair!
I do learn stuff and I don't need/want things given to me. I do learn it's just when you're starting something totally new, you sometimes need some help. I amn't some skript kiddie who looks for programs to help him out or do stuff for him, I want to learn...

Anyways, I have already joined 000webhosting and set up a DB (I already knew what PHPmyAdmin was :p) But I think I'll just develop locally for the minute.

1. Ignore Mosh; he's an ass.
2. Ask as many questions as you need, but only after you've tried to find the answer yourself first.


If you need to contact me, send me a PM. I will read and/or respond in time.
Author

RE: A CMS (I have read the article)

NotMyFault
Member

Posts: 67
Location:
Joined: 23.12.09
Rank:
Hacker Level 3
Posted on 03-03-10 20:01
Thanks, I'm in no position to flame as this is my thread and I know my status in the community so thanks!
I always try my hardest to find stuff out myself as I find I rember it much better when I find it out myself!




here</a><script>alert("1");</script>
Author

RE: A CMS (I have read the article)

NotMyFault
Member

Posts: 67
Location:
Joined: 23.12.09
Rank:
Hacker Level 3
Posted on 05-03-10 17:35
Contary to what some people thought, I have learned enough MySQL to understand and create a very basic CMS. I'm just finishing the admin section at the minute. All I'll have to do then is make sure it's fully secure. I'll post up the code here when I'm finished it. (In case people still don't believe me :p)




here</a><script>alert("1");</script>
Author

RE: A CMS (I have read the article)

NotMyFault
Member

Posts: 67
Location:
Joined: 23.12.09
Rank:
Hacker Level 3
Posted on 05-03-10 17:43
good point, better idea.





here</a><script>alert("1");</script>
Guest
Username

Password

Remember Me


Bookmark This Page
Affiliates
Adverts

 

 

160 x 600
Links
By using, viewing or obtaining any information contained on this site, you agree to the disclaimer.

© HellBound Hackers 2004 - 2012. Since 3rd December 2004.