---
title: "How many ways we can pass the variable through the navigation between the pages?"  
description: "How many ways we can pass the variable through the navigation between the pages?"  
author: "Anonymous User"  
published: 2011-06-13  
updated: 2020-09-22  
canonical: https://www.mindstick.com/interview/1053/how-many-ways-we-can-pass-the-variable-through-the-navigation-between-the-pages  
category: "php"  
tags: ["php"]  
reading_time: 1 minute  

---

# How many ways we can pass the variable through the navigation between the pages?

Atleast we done this task by using three ways.

1. Put the variable into session in the first page, and get it back from session in the next page. \
2. Put the variable into cookie in the first page, and get it back from the cookie in the next page. \
3. Put the variable into a hidden form field, and get it back from the form in the next page.

## Answers

### Answer by Anonymous User

Atleast we done this task by using three ways.

1. Put the variable into session in the first page, and get it back from session in the next page. \
2. Put the variable into cookie in the first page, and get it back from the cookie in the next page. \
3. Put the variable into a hidden form field, and get it back from the form in the next page.


---

Original Source: https://www.mindstick.com/interview/1053/how-many-ways-we-can-pass-the-variable-through-the-navigation-between-the-pages

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
