how to send information form one page to another page using anchor tag and fetch data from database in php
<p>page1</p>

<pre><code>&lt;?php 
                            mysql_connect("localhost","root","");
mysql_select_db("mydatabase");
$sql="SELECT * FROM user";
$result=mysql_query($sql);
                            while($row=mysql_fetch_array($result))                          {

echo '&lt;a  href="user_profile.php?variableName="'.&amp;row['userid'].' style="text-decoration:none"&gt;'.$row['username'].'&lt;/a&gt;&lt;/form&gt;';
}
?&gt;
</code></pre>

<p>user_profile page</p>

<pre><code>&lt;?php
mysql_connect("localhost","root","");
mysql_select_db("mydatabase");
$sql="SELECT * FROM user where userid=".$_GET['variableName'];
$result=mysql_query($sql);
                            while($row=mysql_fetch_array($result))                          {
echo 'username:'.$row['name'];

}
?&gt;
</code></pre>

<p>Is it right way or not if its right, why its not working, i facing problem to send information to another page. if it's not right way than please suggest me..I need your help.</p>

<p><em><strong>I am not talking about the syntax error</em></strong> plz see my code and try to know what actual i want </p>
