Jump to content

PHP Pause


canadabeeau

Recommended Posts

Is there a way to only let PHP run a piece of code if another variable has a value. Now I know about if but I need it to loop, so it continues to check

 

while ($variable) { 
  //Do somehting
}

 

That's better. Use '!$variable' if you want to run something when it's empty

Link to comment
Share on other sites

It is in relation to the fact that I have AJAX sending a JavaScript variable to process.php

process.php then echos that JS variable as a PHP variable

except its not, so I was wandering if it is becuase the JavaScript has not finished and got a result yet so I should make a loop untill it does and then echo

Link to comment
Share on other sites

It is in relation to the fact that I have AJAX sending a JavaScript variable to process.php

process.php then echos that JS variable as a PHP variable

except its not, so I was wandering if it is becuase the JavaScript has not finished and got a result yet so I should make a loop untill it does and then echo

 

I read on your other thread you were requiring? That's not really what you're supposed to do, use the AJAX handler to get the response (i.e. ajax.response) and place it into what you wish the result to be:

 

document.lblmacaddress.value=ajax.response; ,placing the result of your php file when it is DONE, into your code. See how easy ajax is?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.