Can I wait for a js process within PHP before continuing?
<p>I have a PHP script I use to register users but during that process I'm trying to call a Google GEOCoding javascript method to return the client lat/lng and record it to a DB before continuing with my PHP registration process.</p>

<p>Can this be done or is there a better way?</p>

<p>My current code looks something like this:</p>

<pre><code>private function process() {

    $this-&gt;validate();
    $this-&gt;register();

    // execute javascript here to record lat/lng coordinates to the DB. 

    $this-&gt;goHome();
}
</code></pre>
