REW Steven's Blog: PHP Programing


Input Validation

photo REW Steven

A very important concept in programing a system that will be used by people is Input Validation. When programmers miss this it can make life difficult for others trying to deal with the data.

As I deal with IDX Data I come across this a lot. I recently had a feed with 32 different spellings of a city name. Many of them were just typos like a semicolon (;) instead of an l ( the keys are next to each other on most keyboards ). Other cases were misspellings or variations of a name. An example would be "Saint James", "St. James", and "St James" ( without a period after St ).

If the MLS Board had Input Validation then users of the system would select the city from a list. This would fix more than just they typos and variations on the same name, it would…

Read Full Post

Posted: 1 year ago, Comments: 0, Average Rating: 5 Views: 582

Some Things To Know About IE 7

photo REW Steven

When using javascript in IE 7, you don't need to use getElementById

Thus in IE 6 you would do:

Code: <script>
var city = document.getElementById('city');
alert(city.innerHTML);
</script>



And in IE 7 you can do

Code: <script>
alert(city.innerHTML);
</script>

city is automatically an object pointing to the HTML tag with the id of that name.

This also means that if you accidentally use a variable with the same name as an id of an element, you will get errors.

I'm sure this gives rise to some kind of security flaw.

Read Full Post

Posted: 1 year ago, Comments: 0, Average Rating: 5 Views: 533
REW Blogs User Stats
Currently Online Users: 1
Total Users: 1,831
Entries: 5,442
Unique Views: 2,918,702
Total Views: 3,033,766
Total Comments: 5,648
REW Steven

REW Steven I am a PHP / MySQL Programmer for Real Estate Webmasters. I program custom IDX solutions as well as many other custom features on our clients websites. Read More

This User's Stats
Blog Entries: 10
Average Blog Rating: 8
Unique Views: 4,415
Total Views: 4,702
Comments Posted: 1
Comments Received: 2