title: Convert querystring to int in PHP
body: <p>Working on my first PHP site (I'm mainly an ASP programmer), and I need to convert a querystring variable into a number I can then use to query a database. What's the best way to convert to a usable int (I tried intval() already but I keep getting <code>0</code> as a result) and also validate it (AKA no single quotes, blah blah) in PHP?</p>