On Wed, 2002-02-13 at 11:56, Rick Emery wrote:
> The if-statements are based upon values read from session variables,
> cookies, values from databases, and values for the form that was just
> submitted.
> 
> So, no, there are no if-statements executed on data the user has not
> submitted.

Say what? They can be executed on information read from the filesystem,
the Internet, the date or other system functions, from a random number
generator, pulled out of a database, or whatever.

When used on a web page, PHP uses whatever information it needs to
put together some text to send to the user. This may or may not be
in reaction to a user action (other, of course, than opening the page).

As to Morten's original question, the sequence would go like this:

 1. User requests a page.
 2. The page is presented. It may or may not have been generated
    by PHP, but let's say it contains a form.
 3. The user fills out the form and submits it.
 4. The PHP script parses the form contents and generates an
    appropriate response page, which is sent back to the user.
 5. Go to 1.

So, the user makes a selection which is sent to the server side, where
PHP executes, and sends the data back to the client.


Hope this helps,

Torben

> -----Original Message-----
> From: Morten Nielsen [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 13, 2002 1:56 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Php is serversided????
> 
> 
> Hi,
> I don't understand...
> Everybody says PHP is server based, so everything is calculated before the
> user sees it in his browser. But if that is the case how is it then possible
> to use if-statements. Wouldn't that mean that the if-statement has been
> executed before the user makes a selection?
> 
> Please explain it to me,
> Morten

-- 
 Torben Wilson <[EMAIL PROTECTED]>
 http://www.thebuttlesschaps.com
 http://www.hybrid17.com
 http://www.inflatableeye.com
 +1.604.709.0506


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to