Код: Выделить всё
$fruits = array(
"Orange",
"Banana"
);
if(isset($_GET['fruit']) && in_array($_GET['fruit'], $fruits)) {
// embed user input in HTML page:
echo $_GET['fruit'];
// embed user input in shell command:
shell_exec("script.sh $_GET['fruit']");
// query database with user input:
mysqli_stmt_bind_param($stmt, 's', $_GET['fruit']);
}
Подробнее здесь: https://stackoverflow.com/questions/794 ... pected-val
Мобильная версия