Starting HTML- For beginners

Written by Stephen Cope

Continued from page 1
  • part3-Formatting Text - Fonts
  • part4-Lists and Tables and Images
  • part5-Anchors and Linking

    Web page and HTML editors

    Although it is possible to make a web page using simple text editors like Notepad or Word these tools are only suitable for very basic web pages. Anyone who wants to make a website requires a suitable editor. For an explanation of web page and HTML editors and also how to obtain some very powerful editors even FrontPage for free seerepparttar web Page and HTML editors page.

    Stephen Cope is a freelance trainer and the Webmaster at - making a website and IncrediMail and Outlook Express Updates.

    Developing State-enabled Applications With PHP

    Written by John L

    Continued from page 1

    Installment 3

    PHP Session Handling - Cookies Enabled

    Instead of storing session information atrepparttar browser throughrepparttar 105569 use of cookies,repparttar 105570 information can instead be stored atrepparttar 105571 server in session files. One session file is created and maintained for each user session. For example, if there are three concurrent users browsingrepparttar 105572 website, three session files will be created and maintained - one for each user. The session files are deleted ifrepparttar 105573 session is explicitly closed byrepparttar 105574 PHP script or by a daemon garbage collection process provided by PHP. Good programming practice would call for sessions to be closed explicitly inrepparttar 105575 script.

    The following is a typical server-browser sequence of events that occur when a PHP session handling is used: 1. The server knows that it needs to rememberrepparttar 105576 State of browsing session 2. PHP generates a sssion ID and creates a session file to store future information as required by subsequent pages 3. A cookie is generated wihrepparttar 105577 session ID atrepparttar 105578 browser 4. This cookie that storesrepparttar 105579 session ID is transparently and automatically sent torepparttar 105580 server for all subsequent requests torepparttar 105581 server

    The following PHP session-handling example accomplishesrepparttar 105582 same outcome asrepparttar 105583 previous cookie example. Copyrepparttar 105584 code below (bothrepparttar 105585 php andrepparttar 105586 html) into a file withrepparttar 105587 .php extension and test it out.

    [?php //starts a session session_start();

    //informs PHP that count information needs to be remembered inrepparttar 105588 session file if (!session_is_registered("count")) { session_register("count"); $count = 0; } else { $count++; }

    $session_id = session_id(); ?]

    [html] [head] [title]PHP Session Handling - Cookie-Enabled[/title] [/head] [body] The current session id is: [?=$session_id ?] This page has been displayed: [?=$count ?] times. [/body] [/html]

    A summary ofrepparttar 105589 functions that PHP provides for session handling are: 1. boolean start_session() - initializes a session 2. string session_id([string id]) - either returnsrepparttar 105590 current session id or specifyrepparttar 105591 session id to be used whenrepparttar 105592 session is created 3. boolean session_register(mixed name [, mixed ...]) - registers variables to be stored inrepparttar 105593 session file. Each parameter passed inrepparttar 105594 function is a separate variable 4. boolean session_is_registered(string variable_name) - checks if a variable has been previously registered to be stored inrepparttar 105595 session file 5. session_unregister(string varriable_name) - unregisters a variable fromrepparttar 105596 session file. Unregistered variables are no longer valid for reference inrepparttar 105597 session. 6. session_unset() - unsets all session variables. It is important to note that allrepparttar 105598 variables remain registered. 7. boolean session_destroy() - destroysrepparttar 105599 session. This is opposite ofrepparttar 105600 start_session function.

    The next installment discusses how to manage sessions using PHP session handling functions when cookies are disabled...

    Installment 4

    PHP Session Handling - Without Cookies

    If cookies are disabled atrepparttar 105601 browser,repparttar 105602 above example cannot work. This is because althoughrepparttar 105603 session file that stores allrepparttar 105604 variables is kept atrepparttar 105605 server, a cookie is still needed atrepparttar 105606 browser to storerepparttar 105607 session ID that is used to identifyrepparttar 105608 session and its associated session file. The most common way around this would be to explicitly passrepparttar 105609 session ID back torepparttar 105610 server fromrepparttar 105611 browser as a query parameter inrepparttar 105612 URL.

    For example,repparttar 105613 PHP script generates requests subsequent torepparttar 105614 start_session call inrepparttar 105615 following format:[actual session ID]

    The following are excerpts that illustraterepparttar 105616 discussion:

    Manually buildingrepparttar 105617 URL: $url = "" . session_id(); [a href="[?=$url ?]" rel="nofollow"]Anchor Text[/a]

    Buildingrepparttar 105618 URL using SID: [a href="[?=SID ?]" rel="nofollow"]Anchor Text[/a]

    This PHP scripting article is written by John L. John L is the Webmaster of The Ultimate BMW Blog! (

    The Ultimate BMW Blog!

        <Back to Page 1
 © 2005
    Terms of Use