I am using a query string code. I want to "get" variable of one page to another page.
query1.php:
<?php
$konek = mysql_connect("localhost","root","") or die("Cannot connect to server");
mysql_select_db("test",$konek) or die("Cannot connect to the database");
$query = mysql_query("select * from persons where id='1'");
$row = mysql_fetch_array($query);
$q= $row['details'];
?>
<a href='query_1.php?id=" . $q . "'>aa</a>
query_1.php:
<?php
//$ab=1;
//if(isset($_GET['id']))
$ab= $_GET['id'];
echo $ab;
?>
The above code does not run and give error:
Notice: Undefined index: id
I am not geting what i am missing. So, can some help me out wid my mistake....