modal popup keep populating only first item data on all item buttons

后端 未结 1 1077
独厮守ぢ
独厮守ぢ 2021-01-24 00:52

I am implementing cloth shopping website in which i am uploading cloth items with their images and description from admin panel. on home page i am retrieving all cloth items tha

1条回答
  •  情歌与酒
    2021-01-24 01:34

    1) The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead. Stop using mysql functions.

    2) Why to connect database connection on each and every file. Create one common db file where database connection code is written and include in each file. Otherwise, when database or username or password get changed, then you have to change it in each and every file. So, to avoid it, create one common db file.

    db.php

    
    

    3) IDs can't be same through out a page. So, change it accordingly.

    YourPage.php

    
      
    Product Code:

    PKR

    4) Create one common ajax pop up file in same directory, where pop up content will appear.

    ajax_pop_up.php

    (if you are planning to change file name here, change in data-url of YourPage.php page, both are related to each other)

    
    
    
    ×

    Item Description


    Product Code:
    PKR
    Brand:
    Gender:
    Category:
    Size:
    Material:
    Description:

    Similar Question

    1. GET PHP variable value from HTML data-id
    2. Passing data via Modal Bootstrap and getting php variable?

    Quick Links

    1. Can an html element have multiple ids?

    Go through it. And, if any problem comes, feel free to ask.

    0 讨论(0)
提交回复
热议问题