array_push($types, $q->where('type_id', $type->id)->count(), $type->title);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postdata));
$postdata = array(
'files' => new CURLFile($target),
'action' => 0,
'id_ad' => 0
);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
<input type="radio" onChange="sendForm()" value="woman" id="r2" name="forma-gender">
function sendForm() {
var t = $('#sender').serialize();
$.ajax({
url: "/2018/tech/senderapi.php",
type: "post",
data: t,
success: function(response) {
$("#result_sender").html(response)
}
})
}
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [R,L]
$url_parse_arr = parse_url('https://vk.com/test');
echo $url_parse_arr['path'] // test
$url_parse_arr = parse_url('https://vk.com/id100');
echo $url_parse_arr['path'] // id100
if (preg_match('/id\d+/ui', $url_parse_arr['path'])){
$url_parse_arr['path'] = str_replace('id', '', $url_parse_arr['path'] ); // 100
}
ALTER TABLE dates ADD UNIQUE keyword('date', 'id');
INSERT IGNORE INTO dates (...) VALUES