<?php
if (!empty($_POST['value'])) {
$con = mysqli_connect('localhost','root','','test') or die(mysqli_connect_error());
//echo "Выбран option с значением - ".$_POST['value'];
$sqls = "SELECT * FROM `student` WHERE `fid`='".mysqli_real_escape_string($con, $_POST['value'])."'";
$res = mysqli_query($con, $sqls) or die(mysqli_error($con));
?>
<div class="info">
<?php
if(!empty($res) AND $res->num_rows) {
$row=$res->fetch_assoc();
echo "<br> Студент:".' '. $row["sname"].' '. $row["birthday"];
}
mysqli_close($con);
?>
</div>
<?php
}
if($_POST['value'] == '0'){
?>
<style type="text/css">
#res{
display: none;
}
</style>
<?php
}
if(!empty($_POST['name'])) {
$birthday='1989';
$name =$_POST['sname'];
$fid = $_POST['value'];
$con = new mysqli('localhost','ijdbuser','a9b8e7q6555','workhome') or die(mysqli_connect_error());
mysqli_query($con, "INSERT INTO student (sname,birthday,fid) VALUES('".mysqli_real_escape_string($con, $sname)."','".mysqli_real_escape_string($con, $birthday)."','".mysqli_real_escape_string($con, $fid)."')") or die(mysqi_error($con));
mysqli_close($con);
}
?>
<?php
if (!empty($color_names)) echo("let arr = ".json_encode($color_names).", thisClass = 'color';\naddList(arr, thisClass);\n";
if (!empty($mech_names)) echo("let arr = ".json_encode($mech_names).", thisClass = 'mech';\naddList(arr, thisClass);\n";
if (!empty($upholstery_names)) echo("let arr = ".json_encode($upholstery_names).", thisClass = 'upholstery';\naddList(arr, thisClass);\n";
?>
wget -q -O - "my-site.ru/index.php?route=common/task/doSome" > /dev/null 2>&1
<?php
$url = "http://pagination.loc/getData.php?draw=2&columns%5B0%5D%5Bdata%5D=0&columns%5B0%5D%5Bname%5D=&columns%5B0%5D%5Bsearchable%5D=true".
"&columns%5B0%5D%5Borderable%5D=true&columns%5B0%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B0%5D%5Bsearch%5D%5Bregex%5D=false".
"&columns%5B1%5D%5Bdata%5D=1&columns%5B1%5D%5Bname%5D=&columns%5B1%5D%5Bsearchable%5D=true&columns%5B1%5D%5Borderable%5D=true".
"&columns%5B1%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B1%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B2%5D%5Bdata%5D=2&columns%5B2%5D%5Bname%5D=".
"&columns%5B2%5D%5Bsearchable%5D=true&columns%5B2%5D%5Borderable%5D=true&columns%5B2%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B2%5D%5Bsearch%5D%5Bregex%5D=false".
"&columns%5B3%5D%5Bdata%5D=3&columns%5B3%5D%5Bname%5D=&columns%5B3%5D%5Bsearchable%5D=true&columns%5B3%5D%5Borderable%5D=true&columns%5B3%5D%5Bsearch%5D%5Bvalue%5D=".
"&columns%5B3%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B4%5D%5Bdata%5D=4&columns%5B4%5D%5Bname%5D=&columns%5B4%5D%5Bsearchable%5D=true&columns%5B4%5D%5Borderable%5D=true".
"&columns%5B4%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B4%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B5%5D%5Bdata%5D=5&columns%5B5%5D%5Bname%5D=".
"&columns%5B5%5D%5Bsearchable%5D=true&columns%5B5%5D%5Borderable%5D=true&columns%5B5%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B5%5D%5Bsearch%5D%5Bregex%5D=false".
"&order%5B0%5D%5Bcolumn%5D=0&order%5B0%5D%5Bdir%5D=asc&start=0&length=25&search%5Bvalue%5D=&search%5Bregex%5D=false&_=1582036792375";
$url = urldecode($url);
parse_str(parse_url($url, PHP_URL_QUERY), $arr);
$url = str_replace(parse_url($url, PHP_URL_QUERY), http_build_query(array_intersect_key($arr, array_flip(array("_","draw","start","length")))), $url);
echo($url);