Is there a way of converting a string that contains only numbers to a numeric type?
Im trying to execute the following SQL and I get nothing ($student_exam_number contains a 1 and is passed from $PHP_SELF and then to this script by the post method to execute the SQL with MYSQL)
select * from question_table where exam_id = $student_exam_number
however
select * from question_table where exam_id = 1
works.
I tried
if (is_string ($student_exam_number))
{
echo "string";
}
and It always is string.
Is there a PHP Version 3.0.12 function that will help me out or is there something I can do with MYSQL Version 3.22.27 ?
When I do a PHPINFO here is what the HTTP_POST_VARS is: HTTP_POST_VARS["student_exam_number"] s%3A1%3A%222%22%3B
All my other numerics are fine. TIA