access the variable from one file to third file

deepakagrawal's Avatar
Newbie Member
i have to access the variable from below file (var:- query1)
************************************************** ************
<form method=post action='frame0.php'>
<b> Enter the Query:</b>
<input type="text" name="query1" size=50 />
<input type=submit name=submit value="Sign!">
<input type=reset name=reset value="Start Over">

To below file
include 'config.php';
$roll = 'CREATE DATABASE ids';
 mysql_select_db('ids')or die('Cannot select database');
//$call = $_POST["query1"];
$call = $_SESSION["views"];
$result = mysql_query($call);
while($row = mysql_fetch_array($result))
echo "<b>FirstName:</b>";
echo $row["Name"];
echo "<br>\n";
echo "<b>Age:</b>";
echo $row["Age"];
echo "<br>\n";
echo "<b>Location:</b>";
echo $row["Location"];
echo "<br>\n";
include 'closedb.php';
************************************************** ***************
but i am trying to access that variable but it is not access.
so ples tell me how can i access that variable .....

Last edited by shabbir; 17Apr2007 at 13:10.. Reason: Code formatting.
pradeep's Avatar, Join Date: Apr 2005
Team Leader
I see that $query1 is not defined in the first PHP file.