As far as i understand you want to pass values from one page to another. But i dont think the way you are doing it is a right way.
There are two methods to pass vale from one page to another.
1) Using sessions
2) pass value with urls
Using session is the best method to pass value from one page to another, i ll show you small example here
Try this-
page1.php
PHP Code:
<?php
// this starts the session
session_start();
// this sets variables in the session
$_SESSION['tab']="gymnastics";
$_SESSION['path']="gym";
?>
<form action="page2.php" method="post">
<input type="submit" name= "submit" value="submit"/>
page2.php
PHP Code:
<?php
// this starts the session
session_start();
// echo variable from the session, we set this on our other page
echo "your first value is ".$_SESSION['tab'];
echo "your second value is ".$_SESSION['path'];
?>
Bookmarks