WHERE name LIKE '%$search_q%' AND author LIKE '%$search_q%'
<div class="reg-page">
<div class="container">
<div class="row">
<div class="col-lg-4 col-lg-offset-2">
<div class="form">
<input class="dark" type="text" placeholder="+7" id="client_phone"><br>
<input class="dark" type="text" placeholder="E-mail" id="client_email"><br>
<input class="dark" type="password" placeholder="Пароль" id="client_password"><br>
<div class="btn-blue" onclick="reg();">Зарегистрироваться</div>
</div>
</div>
</div>
</div>
</div>
<div id="headerwrap">
<div class="container">
<div class="row">
<div class="col-lg-7">
<h1 class="fs45 mt50" style="color: #fff">Заголовок</h1>
<h4 class="fs16" style="color: #fff">Описание</h4>
</div>
<div class="col-lg-4 col-lg-offset-1">
<div class="form">
<input id="phone" type="text" placeholder="+7" maxlength="12">
<input id="pass" type="password" placeholder="Пароль" maxlength="12">
<div class="btn-blue" onclick="auth();">Вход</div>
</div>
</div>
</div>
</div>
</div>
На стороне php при успешной операции выводи:
echo json_encode(array('status'=>'1'));
В случае ошибки:
echo json_encode(array('status'=>'0'));