Need help in echo php
<p>I am trying to show some text by default in values tag.I am trying to echo the $row in form value. But, i am getting notice about undefined variable. Can anybody figure out the error?</p>

<pre><code>&lt;?php  
$id=$_GET['id'];
$qry=mysql_query('SELECT * FROM pages WHERE pageid="$id"', $con);
if(!$qry)
{
die("Query Failed: ". mysql_error());
}
while($row=mysql_fetch_array($qry))
{
$row=mysql_fetch_array($qry);
}
?&gt;

&lt;div class="block2"&gt;
&lt;p&gt;&lt;b&gt;Update Article&lt;/b&gt;&lt;/p&gt;
&lt;form action="article_edited.php" method="post" enctype="multipart/form-data"     name="form1" id="form1"&gt;
&lt;p&gt;Article Id &amp;nbsp;&amp;nbsp;&amp;nbsp;:

&lt;label for="image"&gt;&lt;/label&gt;
&lt;input type="text" name="pageid" id="pageid" value="&lt;?php echo $row['pageid']?&gt;" /&gt;
&lt;/p&gt;
&lt;label for="image"&gt;&lt;/label&gt;
&lt;p&gt;Image Path:
&lt;input type="text" name="imgpath" id="imgpath" value="&lt;?php echo $row['imgpath'] ?&gt;" /&gt;
&lt;/p&gt;
&lt;p&gt;Contents &amp;nbsp;&amp;nbsp;&amp;nbsp;:
&lt;label for="cont"&gt;&lt;/label&gt;
&lt;textarea name="contents" id="contents" cols="50" rows="5" &gt;&lt;?php $row['text']     ?&gt;&lt;/textarea&gt;
&lt;/p&gt;
&lt;p align="center"&gt;
&lt;input type="submit" name="Submit" id="Submit" value="Submit" /&gt;
&lt;/p&gt;
&lt;/form&gt;
</code></pre>

<p>Update #1: This is the tutorial i was following :<a href="http://www.vdesignourweb.com/cmsphpsqlb/cms_editarticle.html" rel="nofollow">http://www.vdesignourweb.com/cmsphpsqlb/cms_editarticle.html</a></p>

<p>Update #2: This is the my Table structure :<img src="http://i.stack.imgur.com/vkBCr.png" alt="DB info"></p>

<p>Update #3: I just found that the table has no index. Can this be the problem?</p>
