Re: php includes and ajax [message #173115 is a reply to message #173105] |
Tue, 22 March 2011 10:35 |
Tim Streater
Messages: 328 Registered: September 2010
Karma:
|
Senior Member |
|
|
In article <tLCdncq0KqK_dRrQnZ2dnUVZ_jGdnZ2d(at)giganews(dot)com>,
Lwangaman <user(at)compgroups(dot)net/> wrote:
[far too much. You'll do a lot better by formulating your questions in a
more succinct manner]
> So where does AJAX come into the picture? You say:
>> php knows nothing about AJAX
> I'm not sure you have understood AJAX. PHP pre-processes web pages, and
> processes GET and POST requests and formulates responses. All ajax does is
> help FORMULATE or initiate the request to be sent to the server (and to be
> processed by php) without having to refresh the whole page. PHP knows just as
> much about ajax as it does about any kind of requests received from the
> client.
I hope you read Jerry's response - all that the PHP script knows is that
it is running and has access to certain variables. It will have been
invoked by apache or similar.
None of my PHP scripts in these circumstances do anything with web
pages. They take the data they are given, process it one way or another,
and write output (not, in my case, HTML or even XML) to stdout (I use
echo for this). This output is captured by apache (or similar) and
returned to the browser, where JavaScript may be used to examine those
results and decide how to update the page.
As all your posts appear to be hundreds of words long, and I can't be
arsed to read all that, I'm not sure I even know what you are asking.
--
Tim
"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
|
|
|