NEWS Event in PHP !!!
Moderator: General Moderators
NEWS Event in PHP !!!
I want to build a php page where a user can upload images and text for the web page. Just like CMS. Is there any in build code which i can use to build this news Event updater. With news event updater my manager wants to update the latest news. Can any one help me / suggest what's the best way to do it ? I'm not that much expert in php so i want help from your side ? Can any one help me ?
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: NEWS Event in PHP !!!
This is more of a request for people to write code for you than it is asking a specific question.
My answer: Actually use a CMS that may have this functionality built in. There is no "prebuilt" code in PHP for such things, thats what programming is for
My answer: Actually use a CMS that may have this functionality built in. There is no "prebuilt" code in PHP for such things, thats what programming is for
Re: NEWS Event in PHP !!!
Its not a request to write the code for me !!! I just want to know the best way of doing it from experts before i start ! I can't use CMS for this.
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: NEWS Event in PHP !!!
We'll it's tough to give you an answer without writing code.nithinkk wrote:Its not a request to write the code for me !!! I just want to know the best way of doing it from experts before i start ! I can't use CMS for this.
1) Do you know how to handle forms?
2) Do you know how to validate data?
3) Do you know how to a manipulate database, i.e., inserting, updating, deleting data
Re: NEWS Event in PHP !!!
Code: Select all
We'll it's tough to give you an answer without writing code.
1) Do you know how to handle forms?
2) Do you know how to validate data?
3) Do you know how to a manipulate database, i.e., inserting, updating, deleting dataCode: Select all
MY Answer to your question is a BIG YES !!!- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: NEWS Event in PHP !!!
Yes I completely agree that seeking alternate perspectives on a project is an excellent idea. But what you are asking is extremely vague. I can't answer your question without writing and citing specific examples, which would basically mean I'm writing the entire thing for you (since it's quite basic).nithinkk wrote:Code: Select all
We'll it's tough to give you an answer without writing code. 1) Do you know how to handle forms? 2) Do you know how to validate data? 3) Do you know how to a manipulate database, i.e., inserting, updating, deleting dataHey man ! Taking suggestion is always good ! Bcoz here i can find more PHP experts who have done same kind of work. So before doing it ask'g will help me in many ways....i can learn from others mistakes not mineCode: Select all
MY Answer to your question is a BIG YES !!!
So to answer your vague question with a answer(s)
1) Validate all your data
2) Escape all your input when dealing with MySQL queries (mysql_real_escape_string())
3) Escape all your input when displaying in HTML (htmlentities())
4) Make sure you define server limits on sizes of images to upload, otherwise you are vulnerable to disk issues
5) If possible, re-draw the image using GD and save that image to guarantee no malicious code is in the images
6) Store the images on a filesystem and set up your images dir as chmoded to 644 permission
7) Store the image id in the database which references the path
That's all I can really offer without you asking specific questions, sorry. I'll be more than happy to help if you can provide specifics.