Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8671187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:53:17+00:00 2026-06-12T18:53:17+00:00

After searching for a long time I’ve decided to just ask it here, since

  • 0

After searching for a long time I’ve decided to just ask it here, since the things I found either don’t work(or I can’t get them to work ;)) – or require me to change things on my server, which I would like to avoid.

I want below function to show the output after each result, so the function doesn’t have to be loaded first, which takes a long time. My idea, as you can see below, was to try this with jQuery(1.8.2).

It doesn’t work and I simply can’t get it to work. Is there a better way to do this? Did I make a mistake somewhere causing it not to work?

If you need additional information, please ask.

<?php
print_r($_POST);


if(isset($_POST['p']) && isset($_POST['domain']) && isset($_POST['option']))
{   error_reporting(0);
define('INCLUDE_CHECK',true);
require('admin/API/class_api.php');
require('admin/functions/core.inc.php');

    $dom = explode('.',$_POST['domain']);
    $dom = $dom[0];
    $ext = array('nl','be','eu','net','com','org','biz','info','tk','ws','gr','me','cc','in','gs','name','ch','co','tv','ru','bz','li','lu','pl','se','vg','cx','tl','im','sg','ms','sh','io','mu','fm','am','xxx','ag','sc','nf','md');

    if ($_POST['loop']==40)
     { print 'Laatste loop dus .. STOP : .'.$ext[41]; }
    else
     { print 'Loop: '.$_POST['loop'].' - zoek op : .'.$ext[$_POST['loop']];
       ?>
       <script>
        $.post('test.php', { p:'full', domain:dom, option:opt, loop:'<?php echo $_POST['loop']+1; ?>'},
        function(data){
          $('#domresults2').css('display','block').html(data);
          $('#domloading').css('display','none');
        });
       </script>
       <?php
     }

}
?>




//Start JS
<script>
$('#domsubmit.complete').click( function() {
  var dom = escape($('#domsearch').val());
  var opt = escape($('#option').val());

  $('#domresults2').css('display','none').html('');
  $('#domloading').css('display','inline');

  $.post('test.php', { p:'full', domain:dom, option:opt, loop:0},
     function(data){
       $('#domloading').css('display','none');
       $('#domresults2').css('display','block').html(data);
   });

return false;
});
</script>
//end JS

///////////////////////////

update : solved!

so, what went wrong? -> the php function in core.inc.php referred to a incompatible with jQuery 1.8.2 lib (‘qTip2’). Thanks for the support!

<?php
print_r($_POST);

if (isset($_POST['p']) && isset($_POST['domain']) && isset($_POST['option'])) {
error_reporting(0);
define('INCLUDE_CHECK', true);
require('admin/API/class_api.php');
require('admin/functions/core.inc.php');

$dom = explode('.', $_POST['domain']);
$dom = $dom[0];
$ext = array('nl','be','eu','net','com','org','biz','info','tk','ws','gr','me','cc','in','gs','name','ch','co','tv','ru','bz','li','lu','pl','se','vg','cx','tl','im','sg','ms','sh','io','mu','fm','am','xxx','ag','sc','nf','md');

$loop = $_POST['loop'];
DomCheck($_POST['domain'],$ext[$_POST['loop']]);

if ($loop != count($ext)) {
$loop++;?>
  <script type="text/javascript">
        var opt = '<?php echo $_POST['option']; ?>';
        var dom = '<?php echo $_POST['domain']; ?>';
        $.post('test.php', { p:'full', domain:dom, option:opt, loop:'<?php echo $loop; ?>'},
        function(data){
            $('#domresults2').css('display','block').append(data);
            <?php if ($loop < count($ext)) {
                      echo "$('#domloading').css('display','none');";
                  } ?>
        });
    </script>
<?php
}
}
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T18:53:19+00:00Added an answer on June 12, 2026 at 6:53 pm

    One thing you need to understand is that PHP executes on the server and JavaScript (jQuery) executes on the client.

    This means that by the time jQuery starts executing, PHP is done.

    However, I don’t see a loop anywhere in your code. I think this is more of what you wanted. You’re not doing a “PHP loop using jQuery,” you’re outputting jQuery code in a PHP loop:

    <?php
    if (isset($_POST['p']) && isset($_POST['domain']) && isset($_POST['option'])) {
        error_reporting(0);
        define('INCLUDE_CHECK', true);
        require('admin/API/class_api.php');
        require('admin/functions/core.inc.php');
    
        $dom = explode('.', $_POST['domain']);
        $dom = $dom[0];
        $ext = array('nl','be','eu','net','com','org','biz','info','tk','ws','gr','me','cc','in','gs','name','ch','co','tv','ru','bz','li','lu','pl','se','vg','cx','tl','im','sg','ms','sh','io','mu','fm','am','xxx','ag','sc','nf','md');
    
        foreach ($_POST['loop'] as $loop) {
            if ($loop == 40) {
                print "Laatste loop dus .. STOP : .{$ext[41]}";
            } else {
                print "Loop: {$loop} - zoek op : .{$ext[$loop]}";
    ?>      <script>
                $.post('test.php', { p:'full', domain:dom, option:opt, loop:'<?php echo $loop; ?>'},
                function(data){
                    $('#domresults2').css('display','block').html(data);
                    $('#domloading').css('display','none');
                });
            </script>
    <?php   }
        }
    }
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After long time of searching the best upload technique I've decided to go with
After long time of searching I have to give up and ask. Is it
After searching a long time for a performance bug, I read about denormal floating
After a long time searching and trying I'm asking now for help: My situation:
After searching long time Im unable to find any information on how to best
After searching a long time with no success. before I give up, I would
After searching for a long time for a simple way of changing the text
This is a stupidly easy question, however after searching for a long time I
a question I haven't found an answer to after googling for a long time
After a long time searching for the best way to en/decrypt data between PHP

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.