Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

269
Views
PHP: popup model is not showing dynamic data?

I am trying to show dynamic data count in popup model in PHP but in model data value is always showing the last data count only.

In image we can see p1,p2,p3 are count so when user click on yellow icon popup appears and same dynamic count p1,p1 needs to show in popup model, but it only shows last count which is p9 in pop up modal

enter image description here

<?php 

$formatCount =1;
    while ($showformatsexecrow = mysql_fetch_array($showformatsexec)) {
         
    echo '<div class="ui-widget photo">
            <tr>
                <td align="left" Width="115px">'
                //Here p1,p2,p3 count with radio button appears
               '<p>"P'.$formatCount.'"</p>
                        <input align="left" Width="115px" name = "P1" type = "radio" value = "'.$formatshow.'"

                    </font>
                    <body>
    <a class="open-button" popup-open="popup-1" href="javascript:void(0)">
        &nbsp;<i class="fa fa-eye" style="color:white !important;" aria-hidden="true"></i></a>'

    //popup modal code and $formatCount is dymaic value data in popup which is showing here last value only
    '<div class="popup" popup-name="popup-1">
        <div class="popup-content"> 
            <p>"P'.$formatCount.'"</p> 
        </div>
    </div>
                </td>

            </tr>
        </div>';

        $formatCount++;
    } 

?>
 

JQuery Code:

<script>

$(function () {
// Open Popup
  $('[popup-open]').on('click', function () {
  var popup_name = $(this).attr('popup-open');
  $('[popup-name="' + popup_name + '"]').fadeIn(300);
 });

});

</script> 
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!