NEWS Event in PHP !!!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
nithinkk
Forum Commoner
Posts: 55
Joined: Sat Nov 28, 2009 7:57 am

NEWS Event in PHP !!!

Post by nithinkk »

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 ?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: NEWS Event in PHP !!!

Post by John Cartwright »

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 :D
nithinkk
Forum Commoner
Posts: 55
Joined: Sat Nov 28, 2009 7:57 am

Re: NEWS Event in PHP !!!

Post by nithinkk »

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.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: NEWS Event in PHP !!!

Post by John Cartwright »

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.
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 data
nithinkk
Forum Commoner
Posts: 55
Joined: Sat Nov 28, 2009 7:57 am

Re: NEWS Event in PHP !!!

Post by nithinkk »

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 data

Code: Select all

MY Answer to your question is a BIG YES !!!
Hey 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 mine :-)
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: NEWS Event in PHP !!!

Post by John Cartwright »

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 data

Code: Select all

MY Answer to your question is a BIG YES !!!
Hey 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 mine :-)
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).

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