How to filter a specific id code in the search bar

Hey, I have a database and I put some id codes and each id code is for a specific product and I already create a search bar and create a dynamic page for all products but I don't know the code to filter each id code and go to the dynamic page for the product that their is code had filtered it can you tell me what is the code for this purpose in JavaScript

12th Dec 2019, 7:22 PM
Eyad Farah
Eyad Farah - avatar
1 Answer
+ 4
create two views 1. Listview 2. Detail view The listview would contain a list of everything inside your database, for example if these are content of your database (Html, php, js) The list view would be 1. Html 2. Php 3. Javascript Then add a url that links to the detailview making it unique by their id's.. So the list view could be 1. <a href="detailview/id-for-html">html</a> 2. <a href="detailview/id-for-php">php</a> And so on, if you're using php, then doing this is easy with forloop Then inside the detailview, retrieve the id and use it to render the detail templates. simple javascript code could be used for filtering
12th Dec 2019, 7:49 PM
Mirielle - avatar