Re: [PHP] Php is serversided????
Two ways this is possible: 1. The user has selected an item and hit the submit button, thereby sending everything to the server and it is working there. 2. The user comes in from a different link, different server, or has a cookie on their machine. - Original Message - From: Morten Nielsen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 13, 2002 12:56 PM 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Php is serversided????
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. -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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Php is serversided????
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
RE: [PHP] Php is serversided????
Just remember that what the user sees is always just static html. If some decision needs to happen the user has to send some sort of request of the web server to do something, and that's where PHP does its thing. For client-side stuff, like Java Applets. There is actually code running on the user's machine that can do things on it's own. It can perform operations without having to send a request to the webserver, the web server does something, then sends a response back. The Internet is stateless and dumb. HTML isn't dynamic, but PHP can make decisions on what data (html) to send to the client based on certain variables. You can make dynamic web sites with PHP, but the user still gets plain old HTML in the end that doesn't know how to do anything (the browser reads it and displays the content). That's why HTML isn't a programming language. On 13 Feb 2002 at 12:13, Lars Torben Wilson wrote: 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 K E I T H V A N C E Web Developer, IT Professional http://www.vanceconsulting.net [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php