First you have to define what makes a school unique. In this case, probably the combination of state, city, or zip code (depending on how detailed the information is) and school name. Second, you have to standardize this information. Capitalization is your biggest problem - put the important fields in all caps. Third, make sure mySQL recognizes that the combination of these fields has to be unique. A UNIQUE INDEX will prevent multiple records being submitted with the same field combination.
Fourth, duplicates will still get through due to misspellings or name variations. Make sure you have an easy way to list all the schools in a particular zip in alphabetic order, so you can identify duplicate entries with a minimum of trouble.
Fifth, spam will also be a problem. Keep a cache of the last x number of submissions with IP and timestamp, and reject submissions from the same IP within x seconds of its last submission. You can also keep a log of submission attempts and run a secondary routine every now and then to identify bots.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.