Transferring a single row into an array & echo it into their respective textboxes
<p>I'm doing a search function where the user need to input ID number in order to search a person's info. I did search the web on how to do this, but I got stuck when transferring the data back. In my case, I want to transfer every data into their respective textbox. For example :</p>

<pre><code>fullname =&gt; fullname textbox
gender =&gt; gender textbox
</code></pre>

<p>So how do I convert the array into individual php variable and echo it in the textbox? Or there might be any better way? Here is the function on what I've done so far :</p>

<pre><code>function userRetrieve ($cardid) {
$cardid = mysql_real_escape_string($cardid);
$sql = mysql_query("SELECT * FROM `users` WHERE `card_id` = '$cardid'");
$res = mysql_query($sql) or trigger_error(mysql_error().$sql);
$row = mysql_fetch_assoc($res);
    if ($row){
        //What should I do here? 
    }
}
</code></pre>

<p>Any help would be appreciated. Thank you. </p>