Welcome to Dream.In.Code
Getting Help is Easy!

Join 118,923 Programmers for FREE! Ask your question and get quick answers from experts. There are 1,952 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



Suggestions on how to Build Online Petition into website

 
Reply to this topicStart new topic

Suggestions on how to Build Online Petition into website

Limitbreaker
post 3 May, 2008 - 06:28 AM
Post #1


New D.I.C Head

*
Joined: 9 Feb, 2007
Posts: 3


My Contributions


Hi, Im building a website to stop a local concrete plant from expanding to 300,000 ton/month hot mix asphalt plant. Im not leading the fight but I volunteered to give it a web presence. I have been asked if we can create an online petition. I was wondering if anyone could offer me some input on the best way to go about it. I would describe my skills as intermediate. Any suggestions are greatly appreciated, Thank You
User is offlineProfile CardPM

Go to the top of the page


grimpirate
post 3 May, 2008 - 08:57 PM
Post #2


D.I.C Head

Group Icon
Joined: 3 Aug, 2006
Posts: 177



Thanked 5 times

Dream Kudos: 375
My Contributions


Create whatever the petition is supposed to look like online. Provide the necessary fields to be filled in. Then use something like PHP with an SQL database backend to store the people who sign the petition. You'd also need some sort of user input checking/security/validation.
User is offlineProfile CardPM

Go to the top of the page

Limitbreaker
post 4 May, 2008 - 05:46 AM
Post #3


New D.I.C Head

*
Joined: 9 Feb, 2007
Posts: 3


My Contributions


QUOTE(grimpirate @ 3 May, 2008 - 08:57 PM) *

Create whatever the petition is supposed to look like online. Provide the necessary fields to be filled in. Then use something like PHP with an SQL database backend to store the people who sign the petition. You'd also need some sort of user input checking/security/validation.



Srry for not being more specific that is actually what I was wondering about. What should be used for validation and security?
User is offlineProfile CardPM

Go to the top of the page

joeyadms
post 4 May, 2008 - 11:45 PM
Post #4


D.I.C Head

Group Icon
Joined: 4 May, 2008
Posts: 145



Thanked 6 times

Dream Kudos: 600
My Contributions


QUOTE

Srry for not being more specific that is actually what I was wondering about. What should be used for validation and security?


Well first off is security. Make sure whatever language you use, you protect against SQL injection, it is a critical threat, yet it is found everywhere. If you use php and mysql, look at mysqli_real_escape_string(), or better yet use prepared queries.

Next thing, XSS, your not going to want to allow html, so escape EVERY bit of variable data you output, even if it comes from the database. Trust Nothing. If your using PHP, again, look at htmlspecialchars() .

Validation. If you mean people posting bogus stuff, use regex to filter out unwanted data, you could also use a blacklist method of sorting out obscene words. I wouldnt discard entries tho, in case of false positive, say if something is flagged then it has the 'approved' column in the database set to 0, and have the script not show the entries not approved.

Then make a admin interface that you can edit/delete/approve entries.
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 10/13/08 05:08AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month