First foray into PHP/MySQL: some VERY basic questions
I have recently built a website for my local youth orchestra. They have no budget whatever to pay a professional to do their site development - that's where I come in, as the father of one of the trumpet players!
They're very happy with the site, but regular updating with news bulletins is something I'd like to offload back to the orchestra committee.
To that end I have created a very simple MySQL database with just one 'news_entries' table containing four fields:
- entry_id (auto_increment, primary)
- entry_title (varchar)
- entry_content (text)
- entry_created (timestamp)
I have created a 'create_news_item.php' page to allow data to be entered into the db: that is working fine.
I have succeeded in pulling the data back out of the db and displaying news entries on the index.php page as individual news items.
I have some general and basic questions, however.
- in this kind of situation - where one or two designated orchestra committee members are the only ones who will use the create_entry.php page - would I just send them a link to that page and let them work away or would I need to secure the create_entry.php page, somehow? If the page needs to be secured, how would I go about that?
- Instead of all news entries showing on the home page, I'd like to:
- (a) show, let's say, only the last 5 news items
- (b) for any entries more than 3 or 4 lines long, I'd like to display just the first paragraph and then have a 'More..' link which would reveal (with an expanding div?) the full entry.
How would I script (a) and (b), above, in php?
There are other things I would like to do, e.g.
- allow a news item to be edited and/or deleted
- allow uploading of a photo to accompany each news item
... but, for now, I'll hold off on these steps.
If anyone could help me with the above - in very simple terms for a non-programmer - I'd greatly appreciate it.
Hugh
