I want to get variable value in my another php file
suppose there is three files
1. category.html
<form name='my _form' method='post' action='db_store.php'>
<select name="category">
<option value='yahoo'>Yahoo</option>
</select>
<input type="submit.php" value="submit" name="submit">
2. db_store.php
if(isset($_POST['submit']))
{
$my_cat=$_POST['category'];
}
3. another.php
<?php include('db_store.php');?>
echo "SELECT * FROM tabl_name where category_id='".$my_cat."';
OUTPUT:
SELECT * FROM tabl_name where category_id='';
How to get value in this query with exact value. I used var_dump and also tried through SESSION variable.