How to pass the global variable without a form
Posted: Wed Mar 07, 2007 1:56 pm
Hi I am using php5 and apache 2. My code is as below.
I want to pass the variables $category and $search_txt(which I am getting from a form) to x.php, y.php and z.php. please tell me how to pass it? What should I write inside x.php, y.php and z.php to get the value?
I want to pass the variables $category and $search_txt(which I am getting from a form) to x.php, y.php and z.php. please tell me how to pass it? What should I write inside x.php, y.php and z.php to get the value?
Code: Select all
<?php
// frames.php
global $category, $search_txt;
$category = $_POST["category"];
$search_txt = $_POST["search_text"];
?>
<html>
<head>
<title>HotDeals Inc.</title>
</head>
<FRAMESET ROWS="10%,80%,10%">
<FRAME SRC="header_nav.php">
<FRAMESET COLS="33%,34%,33%">
<FRAME SRC="x.php">
<FRAME SRC="y.php">
<FRAME SRC="z.php">
</FRAMESET>
</FRAMESET>
</FRAMESET>
</html>