A piece of script
<?php $uid = $_GET['uid']; if (!isset($uid)) { er(15); } sec1str($uid);//удаляет теги settype($uid, 'int'); //привести $uid к числовому виду(?) // хотя оно и так работает. пусть будет if ($uid < 1) { // чтобы не мучать бд. // будет выведена ошибка и не будет лишнего обращения к бд er(15); } $q = 'select ..where uid=?'; // работаю с параметризированными запросами. The “problem” is that when you enter 145ячвап or 17foo4 -эє 07 or 95+* in the address bar, everything works. But the address bar is ugly.
Although it is not even violet to me, but in general there is nothing at all. In addition, I am sure that ordinary users will not enter anything there.
If the line is 17foo4 , then the data obtained by 17 uid will be displayed. I understand why this is happening. This happens because php itself converts (brings) the values of variables to the desired form.
If $ uid is 95+* , data for $ uid == 95 will be displayed.
How can I fix the situation? Or let it be as it is? This is the "problem" sucked from the finger.
The fact that you can isset and <0 check in one if I know.