Angelos wrote:
Thanks aeverybody... the result ... is that I must understand better how and
where the programs are executed !!!
Exactly. And it's probably the biggest difference between client-server
progamming and stand-alone programming. Not only when, but where.
A very common approach is to create a PHP 'script' that has more than
one 'incarnation'. Two or three 'pages' from the client's point of
view, but one file on the server.
The PHP file is basically a big 'switch' statement, with the case limb
determined by the presense, or value of a $_POST variable. The first
request from the client will not set the variable, so the default case
is executed, which generates a page with a form.
Next, the user fills out the form and submits it. The same PHP file is
called again, this time seeing posted values, it takes a different
branch of the switch statement, and generates a 'thank you' page or
something.
Back to your original question, how to call PHP from Javascript, you do
it by submitting a form.
Good luck,