D
D
Dim Boy2016-01-14 23:48:47
PHP
Dim Boy, 2016-01-14 23:48:47

How to implement an entry in the database from the search form?

How to make it record in a separate table - everything that users enter in the search field?

<input type="search" name="search" id="searchsite" placeholder="Search_" />

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Arthur, 2016-01-15
@arturka_v_10

if(isset($_POST['search'])) {
$result = protect($_POST['search']);
if(empty($result) ) { echo ("Введите запрос, поле пусто."); }
$insert_it = mysql_query("INSERT INTRO zaprosi SET zapros='$result'");
}

finish it off

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question