How many ways we can pass the variable through the navigation between the pages?

How many ways we can pass the variable through the navigation between the pages?

There are three ways in which the variable can be passed through the navigation between the pages:

1. By starting a session and registering the variables that need to be passes. As a session can be used between pages, the variables can then be accessed on other pages. On the other pages, the session can be started again and the variables accessed.

2. Another option is to use query string to pass the variables.

3. The third option is with the use of a form, i.e. $_POST or $_GET depending on the typr of form used. The form can be used to pass variables that have been used in the form to the page specified with action attribute.

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.