{"id":5223,"date":"2023-01-13T06:37:18","date_gmt":"2023-01-13T06:37:18","guid":{"rendered":"https:\/\/www.codexworld.com\/?p=5223"},"modified":"2023-01-13T06:39:51","modified_gmt":"2023-01-13T06:39:51","slug":"create-dynamic-image-slider-with-php-mysql","status":"publish","type":"post","link":"https:\/\/www.codexworld.com\/create-dynamic-image-slider-with-php-mysql\/","title":{"rendered":"Create Dynamic Image Slider with PHP and MySQL"},"content":{"rendered":"<p><b>Image slider<\/b> is mostly used to display banners or products on the web page. It helps to display multiple images or elements in the same section without taking up much space on the web page. The slider is a very useful component for the eCommerce website. You can use a carousel slider for multiple purposes in the web application, such as displaying featured products, offers, deals, and other important content.<\/p>\n<p>Generally, static images or text contents are used in the slider. But you need to edit and modify the file each time you wish to change or add new images in the slider. To overcome this issue, you can display the images dynamically in the slider. With the dynamic process, the images will be fetched from the database and displayed in the slider. You can change or add images easily from the database without editing the file manually.<\/p>\n<p>In this tutorial, we will show you how to <b>create dynamic image slider<\/b> with jQuery using PHP and MySQL. The dynamic slider can be used to display images from the database with PHP and MySQL. You can use a dynamic slider to integrate the product slider in PHP with the database. There are various jQuery plugins are available to add slider feature to the webpage. We will use <b>slick carousel slider<\/b> plugin to create dynamic image slider with PHP and MySQL.<\/p>\n<p>Before getting started to make <b>dynamic product slider with PHP<\/b>, take a look at the file structure.<\/p>\n<pre class=\"file-struc\">dynamic_image_slider_with_php<span style=\"color:#794938\">\/<\/span>\r\n\u251c\u2500\u2500 dbConfig.php\r\n\u251c\u2500\u2500 index.php\r\n\u251c\u2500\u2500 slick<span style=\"color:#794938\">\/<\/span>\r\n\u2502   \u251c\u2500\u2500 slick.css\r\n\u2502   \u2514\u2500\u2500 slick.min.js\r\n\u251c\u2500\u2500 images<span style=\"color:#794938\">\/<\/span>\r\n\u251c\u2500\u2500 js<span style=\"color:#794938\">\/<\/span>\r\n\u2502   \u2514\u2500\u2500 jquery.min.js\r\n\u2514\u2500\u2500 css<span style=\"color:#794938\">\/<\/span>\r\n    \u2514\u2500\u2500 style.css\r\n<\/pre>\n<h2>Create Database Table<\/h2>\n<p>To store image file information a table needs to be created in the database. The following SQL creates an <code>images<\/code> table with some basic fields in the MySQL database.<\/p>\n<pre style=\"color: rgb(0, 0, 0);\"><span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">CREATE<\/span> <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">TABLE<\/span> <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">`images`<\/span> (\r\n  <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">`id`<\/span> <span class=\"hljs-built_in\" style=\"color: rgb(0, 134, 179);\">int<\/span>(<span class=\"hljs-number\" style=\"color: rgb(64, 160, 112);\">11<\/span>) <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">NOT<\/span> <span class=\"hljs-literal\" style=\"color: rgb(149, 65, 33);\">NULL<\/span> AUTO_INCREMENT,\r\n  <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">`file_name`<\/span> <span class=\"hljs-built_in\" style=\"color: rgb(0, 134, 179);\">varchar<\/span>(<span class=\"hljs-number\" style=\"color: rgb(64, 160, 112);\">255<\/span>) <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">COLLATE<\/span> utf8_unicode_ci <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">NOT<\/span> <span class=\"hljs-literal\" style=\"color: rgb(149, 65, 33);\">NULL<\/span>,\r\n  <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">`title`<\/span> <span class=\"hljs-built_in\" style=\"color: rgb(0, 134, 179);\">varchar<\/span>(<span class=\"hljs-number\" style=\"color: rgb(64, 160, 112);\">255<\/span>) <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">COLLATE<\/span> utf8_unicode_ci <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">NOT<\/span> <span class=\"hljs-literal\" style=\"color: rgb(149, 65, 33);\">NULL<\/span>,\r\n  <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">`created`<\/span> datetime <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">NOT<\/span> <span class=\"hljs-literal\" style=\"color: rgb(149, 65, 33);\">NULL<\/span> <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">DEFAULT<\/span> <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">current_timestamp<\/span>(),\r\n  <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">`modifed`<\/span> datetime <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">NOT<\/span> <span class=\"hljs-literal\" style=\"color: rgb(149, 65, 33);\">NULL<\/span> <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">DEFAULT<\/span> <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">current_timestamp<\/span>(),\r\n  <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">`status`<\/span> tinyint(<span class=\"hljs-number\" style=\"color: rgb(64, 160, 112);\">1<\/span>) <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">NOT<\/span> <span class=\"hljs-literal\" style=\"color: rgb(149, 65, 33);\">NULL<\/span> <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">DEFAULT<\/span> <span class=\"hljs-number\" style=\"color: rgb(64, 160, 112);\">1<\/span> <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">COMMENT<\/span> <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">'1=Active | 0=Inactive'<\/span>,\r\n  PRIMARY <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">KEY<\/span> (<span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">`id`<\/span>)\r\n) <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">ENGINE<\/span>=<span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">InnoDB<\/span> <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">DEFAULT<\/span> <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">CHARSET<\/span>=utf8 <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">COLLATE<\/span>=utf8_unicode_ci;<\/pre>\n<p>Now, you need to insert some data in the <code>images<\/code> table in the database which will be fetched from the database later in the script.<\/p>\n<pre style=\"color: rgb(0, 0, 0);\"><span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">INSERT<\/span> <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">INTO<\/span> <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">`images`<\/span> (<span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">`id`<\/span>, <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">`file_name`<\/span>, <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">`title`<\/span>, <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">`created`<\/span>, <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">`modifed`<\/span>, <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">`status`<\/span>) <span class=\"hljs-keyword\" style=\"color: rgb(149, 65, 33);\">VALUES<\/span>\r\n(<span class=\"hljs-number\" style=\"color: rgb(64, 160, 112);\">1<\/span>, <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">'car-img-1.jpg'<\/span>, <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">'Demo Product 1'<\/span>, <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">'2023-01-12 16:19:36'<\/span>, <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">'2023-01-12 16:19:36'<\/span>, <span class=\"hljs-number\" style=\"color: rgb(64, 160, 112);\">1<\/span>),\r\n(<span class=\"hljs-number\" style=\"color: rgb(64, 160, 112);\">2<\/span>, <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">'car-img-2.jpg'<\/span>, <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">'Demo Product 2'<\/span>, <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">'2023-01-12 16:19:53'<\/span>, <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">'2023-01-12 16:19:53'<\/span>, <span class=\"hljs-number\" style=\"color: rgb(64, 160, 112);\">1<\/span>),\r\n(<span class=\"hljs-number\" style=\"color: rgb(64, 160, 112);\">3<\/span>, <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">'car-img-3.jpg'<\/span>, <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">'Demo Product 3'<\/span>, <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">'2023-01-12 16:20:03'<\/span>, <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">'2023-01-12 16:20:03'<\/span>, <span class=\"hljs-number\" style=\"color: rgb(64, 160, 112);\">1<\/span>),\r\n(<span class=\"hljs-number\" style=\"color: rgb(64, 160, 112);\">4<\/span>, <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">'car-img-4.jpg'<\/span>, <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">'Demo Product 4'<\/span>, <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">'2023-01-12 16:20:11'<\/span>, <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">'2023-01-12 16:20:11'<\/span>, <span class=\"hljs-number\" style=\"color: rgb(64, 160, 112);\">1<\/span>),\r\n(<span class=\"hljs-number\" style=\"color: rgb(64, 160, 112);\">5<\/span>, <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">'car-img-5.jpg'<\/span>, <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">'Demo Product 5'<\/span>, <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">'2023-01-12 16:20:22'<\/span>, <span class=\"hljs-string\" style=\"color: rgb(33, 145, 97);\">'2023-01-12 16:20:22'<\/span>, <span class=\"hljs-number\" style=\"color: rgb(64, 160, 112);\">1<\/span>);<\/pre>\n<p><span class=\"note\">Note that:<\/span> The respective image files must be placed in the images\/ folder.<\/p>\n<h2>Create Directory to Store Images<\/h2>\n<p>A directory is required in the server to store the physical files. Create a folder named <code>images\/<\/code> to store the image files.<\/p>\n<h2>Database Configuration (dbConfig.php)<\/h2>\n<p>The <code>dbConfig.php<\/code> file is used to connect and select the database. Specify the database host (<code>$dbHost<\/code>), username (<code>$dbUsername<\/code>), password (<code>$dbPassword<\/code>), and name (<code>$dbName<\/code>) as per your MySQL database credentials.<\/p>\n<pre><span style=\"color: #0000BB\">&lt;?php&nbsp; <br \/> <br \/><\/span><span style=\"color: #FF8000\">\/\/&nbsp;Database&nbsp;configuration&nbsp; <br \/><\/span><span style=\"color: #0000BB\">$dbHost&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">\"localhost\"<\/span><span style=\"color: #007700\">;&nbsp; <br \/><\/span><span style=\"color: #0000BB\">$dbUsername&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">\"root\"<\/span><span style=\"color: #007700\">;&nbsp; <br \/><\/span><span style=\"color: #0000BB\">$dbPassword&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">\"root\"<\/span><span style=\"color: #007700\">;&nbsp; <br \/><\/span><span style=\"color: #0000BB\">$dbName&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">\"codexworld_db\"<\/span><span style=\"color: #007700\">;&nbsp; <br \/>&nbsp; <br \/><\/span><span style=\"color: #FF8000\">\/\/&nbsp;Create&nbsp;database&nbsp;connection&nbsp; <br \/><\/span><span style=\"color: #0000BB\">$db&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;new&nbsp;<\/span><span style=\"color: #0000BB\">mysqli<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$dbHost<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$dbUsername<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$dbPassword<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$dbName<\/span><span style=\"color: #007700\">);&nbsp; <br \/>&nbsp; <br \/><\/span><span style=\"color: #FF8000\">\/\/&nbsp;Check&nbsp;connection&nbsp; <br \/><\/span><span style=\"color: #007700\">if&nbsp;(<\/span><span style=\"color: #0000BB\">$db<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">connect_error<\/span><span style=\"color: #007700\">)&nbsp;{&nbsp; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;die(<\/span><span style=\"color: #DD0000\">\"Connection&nbsp;failed:&nbsp;\"&nbsp;<\/span><span style=\"color: #007700\">.&nbsp;<\/span><span style=\"color: #0000BB\">$db<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">connect_error<\/span><span style=\"color: #007700\">);&nbsp; <br \/>} <br \/> <br \/><\/span><span style=\"color: #0000BB\">?&gt;<\/span><\/pre>\n<h2>Dynamic Image Slider (index.php)<\/h2>\n<p>The images and text contents are fetched from the database and added to the slick slider.<\/p>\n<p><b>jQuery Library:<\/b><br \/>\nThe <code>slick.js<\/code> library has a dependency on jQuery, include the jQuery library file first.<\/p>\n<pre style=\"color: rgb(95, 94, 78);\"><span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">script<\/span> <span class=\"hljs-attr\">src<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/3.6.3\/jquery.min.js\"<\/span>&gt;<\/span><span class=\"undefined\"><\/span><span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;\/<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">script<\/span>&gt;<\/span><\/pre>\n<p><b>Slick Carousel Plugin:<\/b><br \/>\nThe jQuery slick plugin is used to add slider feature in HTML, so, include the CSS and JS library files of the slick slider.<\/p>\n<pre style=\"color: rgb(95, 94, 78);\"><span class=\"hljs-comment\" style=\"color: rgb(108, 107, 90);\">&lt;!-- slick slider CSS library files --&gt;<\/span>\r\n<span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">link<\/span> <span class=\"hljs-attr\">rel<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"stylesheet\"<\/span> <span class=\"hljs-attr\">type<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"text\/css\"<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"slick\/slick.css\"<\/span>\/&gt;<\/span>\r\n<span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">link<\/span> <span class=\"hljs-attr\">rel<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"stylesheet\"<\/span> <span class=\"hljs-attr\">type<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"text\/css\"<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"slick\/slick-theme.css\"<\/span>\/&gt;<\/span>\r\n\r\n<span class=\"hljs-comment\" style=\"color: rgb(108, 107, 90);\">&lt;!-- slick slider JS library file --&gt;<\/span>\r\n<span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">script<\/span> <span class=\"hljs-attr\">type<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"text\/javascript\"<\/span> <span class=\"hljs-attr\">src<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"slick\/slick.min.js\"<\/span>&gt;<\/span><span class=\"undefined\"><\/span><span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;\/<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">script<\/span>&gt;<\/span><\/pre>\n<p>Use the <b>slick()<\/b> method to initialize the slider and attach it to the HTML element.<\/p>\n<ul>\n<li>Specify the parent div class (<code>.product-slider<\/code>) as a selector to bind the slick slider.<\/li>\n<li>You can use some setting options to configure the slider as per the application requirement.<\/li>\n<\/ul>\n<pre style=\"color: rgb(95, 94, 78);\"><span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">script<\/span>&gt;<\/span>\r\n<span style=\"color: rgb(110, 107, 94);\">$(<span class=\"hljs-built_in\" style=\"color: rgb(182, 86, 17);\">document<\/span>).ready(<span class=\"hljs-function\"><span class=\"hljs-keyword\" style=\"color: rgb(184, 84, 212);\">function<\/span>(<span class=\"hljs-params\" style=\"color: rgb(182, 86, 17);\"><\/span>)<\/span>{\r\n    $(<span class=\"hljs-string\" style=\"color: rgb(96, 172, 57);\">'.product-slider'<\/span>).slick({\r\n        slidesToShow: <span class=\"hljs-number\" style=\"color: rgb(182, 86, 17);\">1<\/span>,\r\n        slidesToScroll: <span class=\"hljs-number\" style=\"color: rgb(182, 86, 17);\">1<\/span>,\r\n        dots: <span class=\"hljs-literal\" style=\"color: rgb(182, 86, 17);\">false<\/span>,\r\n        infinite: <span class=\"hljs-literal\" style=\"color: rgb(182, 86, 17);\">true<\/span>,\r\n        arrows: <span class=\"hljs-literal\" style=\"color: rgb(182, 86, 17);\">true<\/span>\r\n    });\r\n});<\/span>\r\n<span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;\/<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">script<\/span>&gt;<\/span><\/pre>\n<p><b>Slider Element with Dynamic Images:<\/b><br \/>\nThe image and title are fetched from the database and listed to define slider markup.<\/p>\n<ul>\n<li>The data are retrieved from the database dynamically using PHP and MySQL.<\/li>\n<li>All the images and titles should be listed under the parent div (<code>.product-slider<\/code>) whose class is specified as a selector in the <code>slick()<\/code> method.<\/li>\n<\/ul>\n<pre style=\"color: rgb(95, 94, 78);\"><span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">div<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"product-slider\"<\/span>&gt;<\/span>\r\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #0000BB\">&lt;?php <br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;Include&nbsp;database&nbsp;configuration&nbsp;file <br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #007700\">require&nbsp;<\/span><span style=\"color: #DD0000\">'dbConfig.php'<\/span><span style=\"color: #007700\">; <br \/>&nbsp;&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;Retrieve&nbsp;images&nbsp;from&nbsp;the&nbsp;database <br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$query&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$db<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">query<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">\"SELECT&nbsp;*&nbsp;FROM&nbsp;images&nbsp;WHERE&nbsp;status&nbsp;=&nbsp;1\"<\/span><span style=\"color: #007700\">); <br \/>&nbsp;&nbsp;&nbsp;&nbsp; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;if(<\/span><span style=\"color: #0000BB\">$query<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">num_rows&nbsp;<\/span><span style=\"color: #007700\">&gt;&nbsp;<\/span><span style=\"color: #0000BB\">0<\/span><span style=\"color: #007700\">){ <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while(<\/span><span style=\"color: #0000BB\">$row&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$query<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">fetch_assoc<\/span><span style=\"color: #007700\">()){ <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$imageURL&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'images\/'<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #0000BB\">$row<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">\"file_name\"<\/span><span style=\"color: #007700\">]; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">?&gt;<\/span>\r\n        <span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">div<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"slide\"<\/span>&gt;<\/span>\r\n            <span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">img<\/span> <span class=\"hljs-attr\">src<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"<span style=\"color: #0000BB\">&lt;?php&nbsp;<\/span><span style=\"color: #007700\">echo&nbsp;<\/span><span style=\"color: #0000BB\">$imageURL<\/span><span style=\"color: #007700\">;&nbsp;<\/span><span style=\"color: #0000BB\">?&gt;<\/span>\"<\/span> <span class=\"hljs-attr\">alt<\/span>=<span class=\"hljs-string\" style=\"color: rgb(125, 151, 38);\">\"\"<\/span> \/&gt;<\/span>\r\n            <span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">h6<\/span>&gt;<\/span><span style=\"color: #0000BB\">&lt;?php&nbsp;<\/span><span style=\"color: #007700\">echo&nbsp;<\/span><span style=\"color: #0000BB\">$row<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">\"title\"<\/span><span style=\"color: #007700\">];&nbsp;<\/span><span style=\"color: #0000BB\">?&gt;<\/span><span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;\/<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">h6<\/span>&gt;<\/span>\r\n        <span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;\/<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">div<\/span>&gt;<\/span>\r\n&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #0000BB\">&lt;?php&nbsp;<\/span><span style=\"color: #007700\">} <br \/>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;<\/span><span style=\"color: #0000BB\">?&gt;<\/span>\r\n<span class=\"hljs-tag\" style=\"color: rgb(186, 98, 54);\">&lt;\/<span class=\"hljs-name\" style=\"color: rgb(186, 98, 54);\">div<\/span>&gt;<\/span><\/pre>\n<h2>Testing<\/h2>\n<p>Now, if you open the index.php file on the browser, you&#8217;ll see a fully functional dynamic slider with the product image and title on the web page.<\/p>\n<div class=\"img_center\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2023\/01\/dynamic-product-slider-with-php-mysql-codexworld.png\" alt=\"dynamic-product-slider-with-php-mysql-codexworld\" width=\"603\" height=\"446\" class=\"alignnone size-full wp-image-5227\" srcset=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2023\/01\/dynamic-product-slider-with-php-mysql-codexworld.png 603w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2023\/01\/dynamic-product-slider-with-php-mysql-codexworld-300x222.png 300w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2023\/01\/dynamic-product-slider-with-php-mysql-codexworld-350x259.png 350w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2023\/01\/dynamic-product-slider-with-php-mysql-codexworld-320x237.png 320w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2023\/01\/dynamic-product-slider-with-php-mysql-codexworld-380x281.png 380w\" sizes=\"auto, (max-width: 603px) 100vw, 603px\" \/><\/div>\n<p class=\"seeAlso\"><span><\/span><a href=\"https:\/\/www.codexworld.com\/create-dynamic-image-gallery-jquery-php-mysql\/\">Create Dynamic Image Gallery with Database PHP &#038; MySQL<\/a><\/span><\/p>\n<h2>Conclusion<\/h2>\n<p>With this example script, we have tried to provide a step-by-step process to <b>create dynamic slider in PHP<\/b> with MySQL. You can use this dynamic responsive image slider component to build product slider in online shopping or eCommerce website. Here the slick plugin is used for the slider feature that can be configured or customized as per your needs.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Image slider is mostly used to display banners or products on the web page. It helps to display multiple images or elements in the same section without taking up much space on the web page. <\/p>\n","protected":false},"author":1,"featured_media":5229,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4],"tags":[281,16,14,299,282],"class_list":["post-5223","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php","tag-carousel","tag-jquery","tag-php","tag-plugin","tag-slider","cat-4-id","has_thumb"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Create Dynamic Image Slider with PHP and MySQL - CodexWorld<\/title>\n<meta name=\"description\" content=\"Create dynamic image slider in PHP with MySQL database - Example code snippet to make product slider with jQuery using PHP and MySQL. Integrate slick carousel to build dynamic slider in PHP.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.codexworld.com\/create-dynamic-image-slider-with-php-mysql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create Dynamic Image Slider with PHP and MySQL - CodexWorld\" \/>\n<meta property=\"og:description\" content=\"Create dynamic image slider in PHP with MySQL database - Example code snippet to make product slider with jQuery using PHP and MySQL. Integrate slick carousel to build dynamic slider in PHP.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codexworld.com\/create-dynamic-image-slider-with-php-mysql\/\" \/>\n<meta property=\"og:site_name\" content=\"CodexWorld\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/codexworld\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/codexworld\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-13T06:37:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-13T06:39:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2023\/01\/create-dynamic-image-product-carousel-slider-with-jquery-php-mysql-codexworld.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"CodexWorld\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@codexworldblog\" \/>\n<meta name=\"twitter:site\" content=\"@codexworldweb\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"CodexWorld\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/create-dynamic-image-slider-with-php-mysql\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/create-dynamic-image-slider-with-php-mysql\\\/\"},\"author\":{\"name\":\"CodexWorld\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/person\\\/9da51d8fa3cdefeb5ec9c69136d4baf0\"},\"headline\":\"Create Dynamic Image Slider with PHP and MySQL\",\"datePublished\":\"2023-01-13T06:37:18+00:00\",\"dateModified\":\"2023-01-13T06:39:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/create-dynamic-image-slider-with-php-mysql\\\/\"},\"wordCount\":634,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/create-dynamic-image-slider-with-php-mysql\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/create-dynamic-image-product-carousel-slider-with-jquery-php-mysql-codexworld.png\",\"keywords\":[\"Carousel\",\"jQuery\",\"PHP\",\"Plugin\",\"Slider\"],\"articleSection\":[\"PHP\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.codexworld.com\\\/create-dynamic-image-slider-with-php-mysql\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/create-dynamic-image-slider-with-php-mysql\\\/\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/create-dynamic-image-slider-with-php-mysql\\\/\",\"name\":\"Create Dynamic Image Slider with PHP and MySQL - CodexWorld\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/create-dynamic-image-slider-with-php-mysql\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/create-dynamic-image-slider-with-php-mysql\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/create-dynamic-image-product-carousel-slider-with-jquery-php-mysql-codexworld.png\",\"datePublished\":\"2023-01-13T06:37:18+00:00\",\"dateModified\":\"2023-01-13T06:39:51+00:00\",\"description\":\"Create dynamic image slider in PHP with MySQL database - Example code snippet to make product slider with jQuery using PHP and MySQL. Integrate slick carousel to build dynamic slider in PHP.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/create-dynamic-image-slider-with-php-mysql\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.codexworld.com\\\/create-dynamic-image-slider-with-php-mysql\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/create-dynamic-image-slider-with-php-mysql\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/create-dynamic-image-product-carousel-slider-with-jquery-php-mysql-codexworld.png\",\"contentUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/create-dynamic-image-product-carousel-slider-with-jquery-php-mysql-codexworld.png\",\"width\":1920,\"height\":1080,\"caption\":\"create-dynamic-image-product-carousel-slider-with-jquery-php-mysql-codexworld\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/create-dynamic-image-slider-with-php-mysql\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.codexworld.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Dynamic Image Slider with PHP and MySQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#website\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/\",\"name\":\"CodexWorld\",\"description\":\"Web &amp; Mobile App Development Company\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.codexworld.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\",\"name\":\"CodexWorld\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/codexworld-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/codexworld-logo.png\",\"width\":200,\"height\":19,\"caption\":\"CodexWorld\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/codexworld\",\"https:\\\/\\\/x.com\\\/codexworldweb\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/codexworld\",\"https:\\\/\\\/www.youtube.com\\\/codexworld\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/person\\\/9da51d8fa3cdefeb5ec9c69136d4baf0\",\"name\":\"CodexWorld\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"caption\":\"CodexWorld\"},\"description\":\"CodexWorld is a programming blog, one-stop destination for web professionals \u2014 developers, programmers, freelancers, and site owners.\",\"sameAs\":[\"http:\\\/\\\/www.codexworld.com\",\"https:\\\/\\\/www.facebook.com\\\/codexworld\",\"https:\\\/\\\/x.com\\\/codexworldblog\"],\"url\":\"https:\\\/\\\/www.codexworld.com\\\/author\\\/nitya192265\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create Dynamic Image Slider with PHP and MySQL - CodexWorld","description":"Create dynamic image slider in PHP with MySQL database - Example code snippet to make product slider with jQuery using PHP and MySQL. Integrate slick carousel to build dynamic slider in PHP.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.codexworld.com\/create-dynamic-image-slider-with-php-mysql\/","og_locale":"en_US","og_type":"article","og_title":"Create Dynamic Image Slider with PHP and MySQL - CodexWorld","og_description":"Create dynamic image slider in PHP with MySQL database - Example code snippet to make product slider with jQuery using PHP and MySQL. Integrate slick carousel to build dynamic slider in PHP.","og_url":"https:\/\/www.codexworld.com\/create-dynamic-image-slider-with-php-mysql\/","og_site_name":"CodexWorld","article_publisher":"https:\/\/www.facebook.com\/codexworld","article_author":"https:\/\/www.facebook.com\/codexworld","article_published_time":"2023-01-13T06:37:18+00:00","article_modified_time":"2023-01-13T06:39:51+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2023\/01\/create-dynamic-image-product-carousel-slider-with-jquery-php-mysql-codexworld.png","type":"image\/png"}],"author":"CodexWorld","twitter_card":"summary_large_image","twitter_creator":"@codexworldblog","twitter_site":"@codexworldweb","twitter_misc":{"Written by":"CodexWorld","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codexworld.com\/create-dynamic-image-slider-with-php-mysql\/#article","isPartOf":{"@id":"https:\/\/www.codexworld.com\/create-dynamic-image-slider-with-php-mysql\/"},"author":{"name":"CodexWorld","@id":"https:\/\/www.codexworld.com\/#\/schema\/person\/9da51d8fa3cdefeb5ec9c69136d4baf0"},"headline":"Create Dynamic Image Slider with PHP and MySQL","datePublished":"2023-01-13T06:37:18+00:00","dateModified":"2023-01-13T06:39:51+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codexworld.com\/create-dynamic-image-slider-with-php-mysql\/"},"wordCount":634,"commentCount":1,"publisher":{"@id":"https:\/\/www.codexworld.com\/#organization"},"image":{"@id":"https:\/\/www.codexworld.com\/create-dynamic-image-slider-with-php-mysql\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2023\/01\/create-dynamic-image-product-carousel-slider-with-jquery-php-mysql-codexworld.png","keywords":["Carousel","jQuery","PHP","Plugin","Slider"],"articleSection":["PHP"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.codexworld.com\/create-dynamic-image-slider-with-php-mysql\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.codexworld.com\/create-dynamic-image-slider-with-php-mysql\/","url":"https:\/\/www.codexworld.com\/create-dynamic-image-slider-with-php-mysql\/","name":"Create Dynamic Image Slider with PHP and MySQL - CodexWorld","isPartOf":{"@id":"https:\/\/www.codexworld.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codexworld.com\/create-dynamic-image-slider-with-php-mysql\/#primaryimage"},"image":{"@id":"https:\/\/www.codexworld.com\/create-dynamic-image-slider-with-php-mysql\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2023\/01\/create-dynamic-image-product-carousel-slider-with-jquery-php-mysql-codexworld.png","datePublished":"2023-01-13T06:37:18+00:00","dateModified":"2023-01-13T06:39:51+00:00","description":"Create dynamic image slider in PHP with MySQL database - Example code snippet to make product slider with jQuery using PHP and MySQL. Integrate slick carousel to build dynamic slider in PHP.","breadcrumb":{"@id":"https:\/\/www.codexworld.com\/create-dynamic-image-slider-with-php-mysql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codexworld.com\/create-dynamic-image-slider-with-php-mysql\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codexworld.com\/create-dynamic-image-slider-with-php-mysql\/#primaryimage","url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2023\/01\/create-dynamic-image-product-carousel-slider-with-jquery-php-mysql-codexworld.png","contentUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2023\/01\/create-dynamic-image-product-carousel-slider-with-jquery-php-mysql-codexworld.png","width":1920,"height":1080,"caption":"create-dynamic-image-product-carousel-slider-with-jquery-php-mysql-codexworld"},{"@type":"BreadcrumbList","@id":"https:\/\/www.codexworld.com\/create-dynamic-image-slider-with-php-mysql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codexworld.com\/"},{"@type":"ListItem","position":2,"name":"Create Dynamic Image Slider with PHP and MySQL"}]},{"@type":"WebSite","@id":"https:\/\/www.codexworld.com\/#website","url":"https:\/\/www.codexworld.com\/","name":"CodexWorld","description":"Web &amp; Mobile App Development Company","publisher":{"@id":"https:\/\/www.codexworld.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codexworld.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codexworld.com\/#organization","name":"CodexWorld","url":"https:\/\/www.codexworld.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codexworld.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/09\/codexworld-logo.png","contentUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/09\/codexworld-logo.png","width":200,"height":19,"caption":"CodexWorld"},"image":{"@id":"https:\/\/www.codexworld.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/codexworld","https:\/\/x.com\/codexworldweb","https:\/\/www.linkedin.com\/company\/codexworld","https:\/\/www.youtube.com\/codexworld"]},{"@type":"Person","@id":"https:\/\/www.codexworld.com\/#\/schema\/person\/9da51d8fa3cdefeb5ec9c69136d4baf0","name":"CodexWorld","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","caption":"CodexWorld"},"description":"CodexWorld is a programming blog, one-stop destination for web professionals \u2014 developers, programmers, freelancers, and site owners.","sameAs":["http:\/\/www.codexworld.com","https:\/\/www.facebook.com\/codexworld","https:\/\/x.com\/codexworldblog"],"url":"https:\/\/www.codexworld.com\/author\/nitya192265\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2023\/01\/create-dynamic-image-product-carousel-slider-with-jquery-php-mysql-codexworld.png","jetpack_shortlink":"https:\/\/wp.me\/p6bxIh-1mf","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/5223","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/comments?post=5223"}],"version-history":[{"count":4,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/5223\/revisions"}],"predecessor-version":[{"id":5228,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/5223\/revisions\/5228"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/media\/5229"}],"wp:attachment":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/media?parent=5223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/categories?post=5223"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/tags?post=5223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}