Ajax requests to help you. jquery example ajax request
<form> <p><input type = 'text' name='phone' /></p> <p> <select name="delivery_type"> <option value="0">Выберите тип рассылки</option> <option value="sms">SMS</option> <option value="email">E-Mail</option> </select> </p> <p><button type = 'submit'>Submit</button></p> </form> $('form').on('submit', function(e) { e.preventDefault(); var delivery_type = $(this).find('select[name=delivery_type]').val(); if( !(delivery_type.length > 1) ) { alert('Сперва выберите тип рассылки'); return false; } var data = $(this).serialize(); console.log(data); $.ajax({ url: "send.php", method: 'POST',//или GET, dataType:'json', data:data, success: function(result) { console.log(result);// } }); });
result it will be an object that will return the php page to which you link
For example, the send.php code returns
header('Content-type: application/json'); echo jsone_encode(['success'=>true]);
In this case
result = {success:true}
Good luck :)