Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Keep values in search form after submit

<?php

// if data 'search' posted in POST method, make it safe in HTML then store it in $search. If 'search' data was not posted, fill it with an empty string ('')
$search = (isset($_POST['search'])) ? htmlentities($_POST['search']) : '';

?>

<form action="this_page.php" method="post">
    <input type="text" name="search" placeholder="Search..." value="<?= $search ?>">
    <input type="submit" value="Go">
</form>
Comment

PREVIOUS NEXT
Code Example
Php :: catch warning php 
Php :: fakestore api data in laravel 
Php :: wp php footer date automatically 
Php :: laravel migration smallint length 
Php :: A Livewire component was not found 
Php :: wp php blog info image 
Php :: Regex to remove span tags using php [duplicate] codegrepper 
Php :: how to login first before see index php 
Php :: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar://D:/Program Files/Composer - PHP/composer.phar/src/Composer/DependencyResolver/Solver.php on line 223 
Php :: check multiple roles with Blade directive @can? 
Php :: twig to pdf 
Php :: laravel event listener 
Php :: php edit link 
Php :: get 1 data from get laravel 
Php :: Laravel Nested whenLoaded 
Php :: php create empty array with size 
Php :: adjacent post sort order by post title 
Php :: apt-get install php wordpress extensions 
Php :: log magenot 1 
Php :: symfony append to file 
Php :: log php 
Php :: php array_diff 
Php :: Route [login] not defined.Route [login] not defined. 
Php :: Woocommerce Adding Content to the Custom Endpoint 
Php :: php session destroy not working 
Php :: numberformater php format to k and m 
Php :: php check if item in array 
Php :: laravel defalt value null 
Php :: group by count mongodb laravel 
Php :: delete laravel error log 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =