PHP Search Box Tutorial - Filter Data in HTML Table Using PHP & MySQL Database

  Рет қаралды 56,259

Senaid Bacinovic

Senaid Bacinovic

Күн бұрын

Пікірлер: 112
@celestusnyalugwe7943
@celestusnyalugwe7943 2 жыл бұрын
wonderful video which was so easy to follow through. Thank you for including an explanation as you went along, really helps one to understand what you are doing , rather than just following blindly along.💪🏾💪🏾
@betwixtandbetweentechnolog5917
@betwixtandbetweentechnolog5917 3 жыл бұрын
This is probably the best tutorial I've ever seen on building search box! Absolutely amazing. I used it on my project, added some necessary changes and it worked! Thank you man! Keep doing what you do! Good luck! One day this channel will probanly reach 100k subscribers ;)
@SenaidBacinovic
@SenaidBacinovic 3 жыл бұрын
You're very welcome!
@zareenremendies
@zareenremendies 4 жыл бұрын
Great sir👍👍👍
@zahed1696
@zahed1696 2 жыл бұрын
wow thank you bro i needed this so much
@alpachino468
@alpachino468 5 жыл бұрын
Much appreciated, Tovarishch!
@jorgeordonez7747
@jorgeordonez7747 4 жыл бұрын
Was great help, thanks a lot!
@lisykim3631
@lisykim3631 5 жыл бұрын
i watch till the end to support you
@SenaidBacinovic
@SenaidBacinovic 5 жыл бұрын
Appreciate you, thank you.
@ramseselgrande1555
@ramseselgrande1555 4 жыл бұрын
Gracias por compartir conocimiento...
@jcmadetaydon
@jcmadetaydon 5 жыл бұрын
Hello sir do you have any search videos for the comments system you have made?
@JinTwisT
@JinTwisT 6 жыл бұрын
Sve i jedan ti je video uživancija za gledati. Svaka čast. Dal ćeš se držati samo PHP-a ili ćeš krenuti i na druge programske jezike?
@SenaidBacinovic
@SenaidBacinovic 6 жыл бұрын
Hvala puno! Vjerovatno ću se držati samo web programiranja i možda budem imao Java tutoriale, ali to ćemo još vidjeti.
@gloriabukachi1
@gloriabukachi1 6 жыл бұрын
Thank you very much, very good explanation
@SenaidBacinovic
@SenaidBacinovic 6 жыл бұрын
My pleasure, thank you!
@tarekhusam
@tarekhusam 7 жыл бұрын
i love you man ! nice work
@SenaidBacinovic
@SenaidBacinovic 7 жыл бұрын
thank you :)
@gloriyapacheko
@gloriyapacheko 6 жыл бұрын
Hi. It is very well explained.
@SenaidBacinovic
@SenaidBacinovic 6 жыл бұрын
thank you :)
@ChunTix713
@ChunTix713 7 жыл бұрын
Good work. Thank you
@SenaidBacinovic
@SenaidBacinovic 7 жыл бұрын
thank you :)
@janeonielperez6546
@janeonielperez6546 6 жыл бұрын
Thank you so much
@SenaidBacinovic
@SenaidBacinovic 6 жыл бұрын
My pleasure, thank you!
@AtomTCP
@AtomTCP 2 жыл бұрын
Bravo bosanac
@SenaidBacinovic
@SenaidBacinovic 2 жыл бұрын
Hvala!
@AtomTCP
@AtomTCP 2 жыл бұрын
@@SenaidBacinovic Nema na čemu kolega!
@prabeshdebbarma7674
@prabeshdebbarma7674 7 жыл бұрын
Good job coding passive in.... can you provide video for multiple keyword search box to display data like youtube, dailymotion search box I am waiting for your next tutorial have a nice day bro...
@SenaidBacinovic
@SenaidBacinovic 7 жыл бұрын
PRABESH DEBBARMA Sure. I will make it for you. However, at the moment you can find a video tutorial on my channel about jQuery AutoComplete for PHP Search Box, which is similar on how KZbin search box is working. :)
@prabeshdebbarma7674
@prabeshdebbarma7674 7 жыл бұрын
Thanx ....for reply :)
@SenaidBacinovic
@SenaidBacinovic 7 жыл бұрын
Thank you so much! Appreciate the support. :)
@sonoftroy8572
@sonoftroy8572 6 жыл бұрын
Thanks for the content, this really helps me a lot
@SenaidBacinovic
@SenaidBacinovic 6 жыл бұрын
Awesome, glad I could help. :)
@Tracks777
@Tracks777 7 жыл бұрын
Great! Keep it up!
@SenaidBacinovic
@SenaidBacinovic 7 жыл бұрын
MisterBassBoost thank you :)
@VFRodriguez
@VFRodriguez 6 жыл бұрын
Good tutorial. thanks. I tried to visit you site in order to download the source code but I got an error message.
@bushwhack12
@bushwhack12 6 жыл бұрын
Hi, the ':' next to to the word 'host' is giving me an error. I wonder why since yours is working @ 11:30 in your video. im using sublime text 3 to follow this tutorial. Can you help? Thanks man. this is the error im getting. Parse error: syntax error, unexpected ':', expecting ',' or ')' in C:\xampp\htdocs\projects\tutorials\PHP Search Engine\search.php on line 3
@SenaidBacinovic
@SenaidBacinovic 6 жыл бұрын
Those ":" are just shown by my PHPStorm so that it's easier for me, but you actually don't need those. The correct line of the code would be: $connection = new mysqli("localhost", "root", "", "phpSearch");
@bushwhack12
@bushwhack12 6 жыл бұрын
Oh ok, total newbie here still learning the ropes . Hey thanks man.
@SenaidBacinovic
@SenaidBacinovic 6 жыл бұрын
We all start at the beginning, keep it up!
@malithlakmal7971
@malithlakmal7971 3 жыл бұрын
thank you! :-)
@rsartandmedia
@rsartandmedia 4 жыл бұрын
how to create share button in php from which we can share our content to whatsapp and facebook?
@abhidita143
@abhidita143 6 жыл бұрын
yes and thank you! :-)
@SenaidBacinovic
@SenaidBacinovic 6 жыл бұрын
Dee Boxer Amazing, thank you :)
@fjb46
@fjb46 5 жыл бұрын
Hi Senaid! in the Dutch language - as in French - we use many special characters such as: é, è, à, ç, ë. When reading and displaying my data, the pagination stops every time a record has to be shown that contains such a special character! How can I bypass this? I could replace the special characters with characters without accent, but then the spelling and pronunciation is wrong! Greetings, and thanks you already for all the examples I eagerly devour.
@chrismakri8474
@chrismakri8474 5 жыл бұрын
This is really good, is there a way to show more than one column?
@desirocker9099
@desirocker9099 6 жыл бұрын
I would have come so far if it wasn't for you, Sir. Thank you very much.
@jasonfrazee5508
@jasonfrazee5508 7 жыл бұрын
Is there a way to incorporate this into a wordpress theme? I have been learning alot of stuff lately and have some questions haha
@jasonfrazee5508
@jasonfrazee5508 7 жыл бұрын
I have made a blank wordpress theme and am struggling to figure out how to link phpmyadmin database to it. Your video is the closest tutorial I can find to what i am trying to do...
@elisantos1156
@elisantos1156 7 жыл бұрын
How to do search with function type function search () instead of via /search.php, in this case using model and controller
@SenaidBacinovic
@SenaidBacinovic 7 жыл бұрын
Are you using some framework or ?
@elisantos1156
@elisantos1156 7 жыл бұрын
Hi, I'm using a simple MVC structure, other than CodeIgniter and others
@SenaidBacinovic
@SenaidBacinovic 7 жыл бұрын
I am not an expert in CodeIgniter, also I never worked with it, but I did some research for you and came up with this answer: stackoverflow.com/questions/8821844/how-to-create-mvc-for-search-in-codeigniter Hope it will help you...
@elisantos1156
@elisantos1156 7 жыл бұрын
Our, helped a lot, but so thank you very much for offering me this information, which added a lot in my project, Thank you very much lol
@FaTaLDRAG0NZ
@FaTaLDRAG0NZ 6 жыл бұрын
Hey, I've done all what you've said but I keep getting the 'Your search query doesn't match' at the top of the screen permanently without changing. Any ideas what part of my code may not be workin. I think it may be line 10/11. I had to remove the word query: before the select statement. Does this matter? Cheers man!
@SenaidBacinovic
@SenaidBacinovic 6 жыл бұрын
Yes, you need to remove it from all places, because that is not supposed to be there, it's just PHPStorm feature to help coder with parameters needs for that specific function.
@sha8639
@sha8639 6 жыл бұрын
why it does not work for me. no error but no output. can you help me I have been stuck a week ago for this coding search.
@SenaidBacinovic
@SenaidBacinovic 6 жыл бұрын
Can you show me the code?
@arunagrawal6270
@arunagrawal6270 4 жыл бұрын
Dear Sir awesome tutorial. Can you please make a video tutorial with source code how to search database on matching 2 inputs for example id and name in php? Thanking you Sir
@techcanyon411
@techcanyon411 5 жыл бұрын
I would advise you to join the Patreon community as a developer so peoples can cherish your hard work.
@nathannelson5645
@nathannelson5645 7 жыл бұрын
Nice video! Can you explain to me how we can get multiple info out of search, say a first and last name?
@SenaidBacinovic
@SenaidBacinovic 7 жыл бұрын
Thank you. As you can see in our SQL query, we are asking only for firstName (SELECT firstName ....), and if you want to ask for some others, you just need to specify the name of those columns. For example: SELECT firstName, lastName, email FROM ...
@nathannelson5645
@nathannelson5645 7 жыл бұрын
Oh, ok, so you can put them in an array I take it? Or is that field an array already? Very new to PHP, so thank you for your help!
@SenaidBacinovic
@SenaidBacinovic 7 жыл бұрын
At the moment you're getting firstName from database inside while loop with $data['firstName'], and you can do it the same way for other columns too. For example for lastName: $data['lastName'];
@nathannelson5645
@nathannelson5645 7 жыл бұрын
Ok, I'm almost understanding this, right now what I did was just copied this and used it 6 times in the code so I could call different things back for the database $sql = $connection->query("SELECT distributor_id FROM searchID WHERE $column LIKE '%$q%' "); if ($sql->num_rows > 0) { while ($data = $sql->fetch_array()) echo $data['distributor_id'] . ""; } else echo "Error: Your search query doesn't match any data!"; wondering if their is a way to put all the information in an array? Would you be kind enough to give me that info. This is helping me out so much and I will share your channel with all my coding buddies as well! Thank you for the help!
@SenaidBacinovic
@SenaidBacinovic 7 жыл бұрын
Let me try. Let's say that from the video above we want to print email, firstName and lastName for each customer, the code for it will be: $sql = $connection->query("SELECT firstName, lastName, email FROM users WHERE $column LIKE '%$q%'"); if ($sql->num_rows > 0) { while ($data = $sql->fetch_array()) echo $data['firstName'] . " " . $data['lastName'] . " " . $data['email'] . " "; } else echo "Your search query doesn't match any data!"; Get it now? Btw, thank you for sharing it with your friends!
@samikshyamishra8039
@samikshyamishra8039 6 жыл бұрын
Hi Senaid Thank you for the video.. I want to know how to execute the search query for showing multiple infos in output as table. Also I want the user to see the output table in another page,not in same search page. Waiting for your reply.
@SenaidBacinovic
@SenaidBacinovic 6 жыл бұрын
Thank you. What you want is very simple. To display multiple pieces of information on the table, just select them in the SQL query and display through while loop, and to show it in another page just change the action of the form.
@ahmedatya6226
@ahmedatya6226 4 жыл бұрын
Thank you For the Video but when i press button it bring me all names without search
@mithungupta9897
@mithungupta9897 7 жыл бұрын
i want to make classified website but i dont know how to make searchbox to get data from category and display please help
@SenaidBacinovic
@SenaidBacinovic 7 жыл бұрын
Just watch the video above and see how I filtered the data. The same way you will filter data from different categories.
@PriyaSingh-lz4ip
@PriyaSingh-lz4ip 6 жыл бұрын
How we make it came in random table raw?
@Happystoreup
@Happystoreup 5 жыл бұрын
Thank you so much! I will try! anyway...............you're handsome!
@SenaidBacinovic
@SenaidBacinovic 5 жыл бұрын
Thank you :)
@BucurIonNiculae
@BucurIonNiculae 5 жыл бұрын
5:00
@niketanpatil5594
@niketanpatil5594 5 жыл бұрын
Parse error: syntax error, unexpected ':' in C:\xampp\htdocs\Sear\test.php on line 5 can u please solve this..thanks anyways
@SenaidBacinovic
@SenaidBacinovic 5 жыл бұрын
Copy/paste that line here...
@niketanpatil5594
@niketanpatil5594 5 жыл бұрын
@@SenaidBacinovic $connection = new mysqli(host: "localhost", username: "root", passwd: "", dbname: "search");
@niketanpatil5594
@niketanpatil5594 5 жыл бұрын
@@SenaidBacinovic can u help?
@SenaidBacinovic
@SenaidBacinovic 5 жыл бұрын
Write line like this: $connection = new mysqli('localhost', 'root', '', 'search');
@niketanpatil5594
@niketanpatil5594 5 жыл бұрын
@@SenaidBacinovic Thanks
@behappey8494
@behappey8494 6 жыл бұрын
thanks for you sir can please do search with filter but filter countery like in linkedin
@SalmanMemon_Sam
@SalmanMemon_Sam 7 жыл бұрын
can you plz post some thing about security in php
@SenaidBacinovic
@SenaidBacinovic 7 жыл бұрын
I already have two tutorials on how to protect your forms in PHP (you can find them on my channel). Is there anything specific that you would love to learn about?
@SalmanMemon_Sam
@SalmanMemon_Sam 7 жыл бұрын
I want to build an online php editor for that i want all those commands which are dangerous for my server
@SenaidBacinovic
@SenaidBacinovic 7 жыл бұрын
Here is the list of most popular dangerous PHP functions: apache_child_terminate, apache_setenv, define_syslog_variables, escapeshellarg, escapeshellcmd, eval, exec, fp, fput, ftp_connect, ftp_exec, ftp_get, ftp_login, ftp_nb_fput, ftp_put, ftp_raw, ftp_rawlist, highlight_file, ini_alter, ini_get_all, ini_restore, inject_code, mysql_pconnect, openlog, passthru, php_uname, phpAds_remoteInfo, phpAds_XmlRpc, phpAds_xmlrpcDecode, phpAds_xmlrpcEncode, popen, posix_getpwuid, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, posix_setuid, posix_uname, proc_close, proc_get_status, proc_nice, proc_open, proc_terminate, shell_exec, syslog, system, xmlrpc_entity_decode
@Prince-gn5fs
@Prince-gn5fs 5 жыл бұрын
Sir Can tell me how i can get image after search like. Firstname, lastname, email, image Please sir help me
@bindumadhavi4059
@bindumadhavi4059 6 жыл бұрын
you are given for one table how can use three tables and run this query
@SenaidBacinovic
@SenaidBacinovic 6 жыл бұрын
Check this tutorial: kzbin.info/www/bejne/hqKXYqyCfpiFrck
@maciejwisniewski5026
@maciejwisniewski5026 6 жыл бұрын
Nice tiger :)
@SenaidBacinovic
@SenaidBacinovic 6 жыл бұрын
hehe, thx :)
@aks6923
@aks6923 6 жыл бұрын
download link not working?
@SenaidBacinovic
@SenaidBacinovic 6 жыл бұрын
What is the problem?
@venomoctopus4060
@venomoctopus4060 5 жыл бұрын
thank you but we need multiple data filter
@mrmoocow7666
@mrmoocow7666 6 жыл бұрын
This didnt work out, u only get like 20 warnings and errors when u try to search for a name !
@tinasheromeo6510
@tinasheromeo6510 7 жыл бұрын
Am building a customises search engine in education using LI not AI.
@RickiFlashPro
@RickiFlashPro 6 жыл бұрын
Your search query doesn't match any data!
@SenaidBacinovic
@SenaidBacinovic 6 жыл бұрын
Ooook, and?
@shahindomar3958
@shahindomar3958 4 жыл бұрын
Sir You tell me That how i can get image after search like. Firstname, lastname, email, image Please sir help me, Thank Sir
How To Create Rating System Using PHP & MySQL & jQuery
31:25
Senaid Bacinovic
Рет қаралды 67 М.
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН
Каха и дочка
00:28
К-Media
Рет қаралды 3,4 МЛН
jQuery Tutorial: jQuery Autocomplete With Ajax & PHP & MySQL
27:10
Senaid Bacinovic
Рет қаралды 27 М.
DHH discusses SQLite (and Stoicism)
54:00
Aaron Francis
Рет қаралды 106 М.
Creating a PHP Search
14:44
Joseph Smith
Рет қаралды 658 М.
Search/Filter Table Data with Javascript
8:57
Dennis Ivy
Рет қаралды 129 М.
The Golden Rule of Web Design
11:14
Sajid
Рет қаралды 18 М.
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН