This is a Frequently Asked Question for beginners getting to grips with the whole clientside versus serverside programming topic.
- PHP can only run on the webserver.
PHP forgets everything it knows once it has served a page up. It even forgets session variables as these are sent to the browser and then retrieved when the next page is requested.
So, to access the webserver scripts you need a page to be created…
- By clicking on a hyperlink
- By submitting a form
- By setting the href of a target frame (_self, _top, _blank, or a specified frame name)
Don’t forget, always store anything to do with your intellectual property or business rules in server side scripts – and in a secure location if possible.