Jump to content

User wants to add new content very simply


moonlander

Recommended Posts

I've created a website using php and it looks pretty good. The user now wants to be able to add news items, attach .pdf documents, pictures, etc. but has no understanding of code or html.

 

How can I amend the website to allow him to do this?

 

Your help would be much appreciated.

Link to comment
Share on other sites

One option is to create an admin section for this user that you create with the options to update what you provide for them. Essentially you be giving the user forms that would submit to the server and add records into the database. Of course, you would need this to be password protected with a login system so not anyone could just arbitrarily add content themselves.

 

So for news, you would create a news table in the database. The news form would provide all the necessary inputs for filling out a news story

  • title
  • description
  • etc

 

Additional fields can be filled out during the INSERT step, like author and posted at time, at the time of the INSERT. Author would come from $_SESSION or the users table that you would have made to support login functionality.

 

All in all it takes a decent amount of effort but all the pieces themselves aren't too complicated, depending on your skill set. The best thing you can do is plan this out with your client, with exactly what they want and what they expect. Mock up the admin section as a PSD or other image so you know exactly what you'll need to support on the backend. (i.e. every form field will need a column in the table it is mapped too). Get all the requirements in writing so you everyone is agreement and then take it one step at a time.

 

I would start with create the admin pages in HTML/CSS/JS till the client approves, then add the Login functionality, and lastly wire all your forms to the backend.

Edited by thescientist
Link to comment
Share on other sites

Thank you for replying. At the moment I do not have a database, just a website on php pages but I assume you are referring to mysqul which I've never yet tried.

 

Is it going to be easier going down this route, learning to use mysqul or would I be better trying to integrate Wordpress with my website?

Link to comment
Share on other sites

Perhaps you could just have a directory for him to upload his added content into using a form with a hard-coded password. You would write Php code to take that submitted form and append it to the bottom of a file. Then at pageload time you would append the entire contents of that file to the bottom of the page. Any image files or pdf files would be uploaded as a part of a submittal and you would create the appropriate HTML for them.

 

The alternative would be to throw everything you have away and install Wordpress to do that same thing.

Edited by davej
Link to comment
Share on other sites

It depends on what they want to change.

 

If it's only data, and not layout, presentation, etc then I don't see the need to use Wordpress. if they all want is to add news articles, update the home page message, or whatever, then an admin section that performs some basic CRUD operations on a database would be a good learning experience without the need for supporting the overhead of WP.

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