- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
function db_connect($serverMySql, $db_log, $db_pass) //create connection
{
$r = mysql_connect($serverMySql, $db_log, $db_pass);
return $r;
}
//....
// страницы
if (empty($_GET["p"])) {
$_GET["p"] = "1";
}
$p = $_GET["p"];
// защита от ввода
if (preg_match("/[%a-z_@.,^=:;Р°-СЏ\"*()&$#в„–+\-!?<>\~`|[{}\]]/i", $p)) {
die(header("Location:sluch_list.php"));
}
http://hashcode.ru/questions/163555/php-%D0%B2%D1%8B%D0%B2%D0%BE%D0%B4-%D1%84%D1%80%D0%B0%D0%B7-%D0%BF%D0%BE-%D1%80%D0%B5%D0%B9%D1%82%D0%B8%D0%BD%D0% B3%D1%83