PHP assistance?

Forum: LinuxTotal Replies: 0
Author Content
grouch

May 10, 2006
10:32 PM EDT
I am not a coder.

I have a PostgreSQL database table with an integer column: photo_id. All form inputs in PHP are cast as strings. I need to do a simple test to check that an integer was entered in the form for photo_id (range is tested later).

Does the following make sense as a test for an integer input?

$photo_id = $_GET['photo_id']; if (is_int($photo_id + 0)) { yadda yadda}

You cannot post until you login.