<div contenteditable="plaintext-only">Россия</div>
$('input[type=[submit]]').on('click', function () {
changeLocation('первый параметр', ui.item.data...что-то там (то есть город, ну или что там у тебя));
});
changeLocation('https://site.ru, 'country|Россия');
<span id"Term"></span>
это получается также бессмысленно.. т.е мне нужно как-то подставить значение пользователя в событие, возможно Ajax ом, только вот как, я вот думаюcase 'country_acc':
require_once $config_abs_path."/classes/categories.php";
if(isset($_GET['term'])) {
$term = escape($_GET['term']);
$result = categories::getAutocompleteRegion($term);
require_once $config_abs_path."/libs/JSON.php";
echo json_encode($result);
}
break;
$link = mysqli_connect($host, $user, $password, $database) or die("Ошибка: ".mysqli_error($link));
mysqli_set_charset($link, 'utf8');
$searchq = $_GET['name'];
$getName = mysqli_query($link, 'SELECT * FROM class_testregion WHERE rus_lng LIKE "%'.addslashes($searchq).'%" ORDER BY name LIMIT 5');
while ($row = mysqli_fetch_array($getName))
echo $row['rus_lng'] . '<br/>';
$c = new categories();
$get_cat = $c->getCategories_M();
$smarty->assign("get_cat", $get_cat);
$ctyp=new users();
if(isset($_POST['post_bann'])){
if(!$ctyp->add_ban($crt_usr)) {
} else {
header ('Location: ads.php');
exit(0);
}
}
add_ban($crt_usr) было add_ban()
function add_ban($id='') {
и так
`user_id` = "'.$id.'"'
$this->id=$id;
, `user_id` = "'.$this['id'].'"
if(!$id) $id=$this->id;
`user_id` = '.$id.'
$this->id->clean['user_id'] = escape($_POST['user_id']);
`user_id` = "'.$this->clean['user_id'].'"
function add_ban() {
global $db;
$this->clean=array();
$this->clean['title'] = escape($_POST['title']);
$this->clean['location'] = escape($_POST['location']);
$this->clean['max_clicks'] = escape($_POST['max_clicks']);
$this->clean['max_impressions'] = escape($_POST['max_impressions']);
$this->clean['link'] = escape($_POST['link']);
$this->clean['position'] = escape($_POST['position']);
$db->query('insert into `class_banners` set `title` = "'.$this->clean['title'].'",`location` = "'.$this->clean['location'].'",`max_clicks` = "'.$this->clean['max_clicks'].'",`max_impressions` = "'.$this->clean['max_impressions'].'",`link` = "'.$this->clean['link'].'",`position` = "'.$this->clean['position'].'";');
return 1;
}
$ctyp=new users();
if(isset($_POST['now_ads'])){
if(!$ctyp->add_ban()) {
} else {
header ('Location: ads.php');
exit(0);
}
}
<form name="bg" method="post" action="">
<input type="text" name="title" value="" size=5 maxlength="20" />
<br/>
<br/>
<input type="text" name="location" value="" size=5 maxlength="20" />
<br/>
<br/>
<input type="text" name="max_clicks" value="" size=5 maxlength="20" />
<br/>
<br/>
<input type="text" name="max_impressions" value="" size=5 maxlength="20" />
<br/>
<br/>
<input type="text" name="link" value="" size=5 maxlength="20" />
<br/>
<br/>
<select name="position" value="">
<option value="header">Header</option>
</select>
<br/>
<br/>
<input type="submit" class="button positive" name="now_ads" id="now_ads" value="{$lng.general.submit}" />
</form>
function HjshGSDB(c, b) {
const url_str = b + "/include/get_info.php";
$.ajax({
method: "GET",
cache : false,
url: url_str,
data: { 'type': "user_q", 'id': c },
}).done(d => {
location.reload(true);
}
}