how to pull array out?

From: Date: Thu, 30 May 2002 16:19:32 +0000
Subject: how to pull array out?
Groups: php.db 
Request: Send a blank email to php-db+get-19523@lists.php.net to get a copy of this message
Not sure how to do this, but I need to pull the contents of an array into editable text fields... As of yet I have not found a way to accomplish this: $table = "auth_users"; $record = @mysql_query("SELECT * FROM $table WHERE user_id = '$user_id'",$dbh); while ($row = mysql_fetch_row($record)) { $user_id = $row['user_id']; $f_name = $row['f_name']; $l_name = $row['l_name']; $email_addy = $row['email_addy']; $un = $row['un']; $pw = $row['pw']; } $var_form .= "<table width=\"100%\" border=\"0\" cellpadding=\"7\"><form name=\"$user_id\" method=\"post\" action=\"del_account.php\"> <tr><td width=\"20%\" colspan=\"2\"><b>Edit Account $user_id</b></td></tr> <tr><td width=\"20%\">First Name:</td><td width=\"80%\"><input type=\"text\" name=\"f_name\" size=\"30\" maxlength=\"30\" value=\"$f_name\"><font class=\"copyright\">i.e. John</font></td></tr> <tr><td width=\"20%\">Last Name:</td><td width=\"80%\"><input type=\"text\" name=\"l_name\" size=\"30\" maxlength=\"30\" value=\"$l_name\"><font class=\"copyright\">i.e. Doe</font></td></tr> <tr><td width=\"20%\">Email:</td><td width=\"80%\"><input type=\"text\" name=\"email_addy\" size=\"30\" maxlength=\"30\" value=\"$email_addy\"><font class=\"copyright\">i.e. johndoe@email.com</font></td></tr> <tr><td width=\"20%\">User Name:</td><td width=\"80%\"><input type=\"text\" name=\"un\" size=\"30\" maxlength=\"30\" value=\"$un\"><font class=\"copyright\">i.e. j-doe</font></td></tr> <tr><td width=\"20%\">Password:</td><td width=\"80%\"><input type=\"password\" name=\"pw\" size=\"30\" maxlength=\"30\"><font class=\"copyright\">(password must be alpha-numeric, i.e. pAs5w0rd)</font></td></tr> <tr><td width=\"20%\">Confirm Password:</td><td width=\"80%\"><input type=\"password\" name=\"pw\" size=\"30\" maxlength=\"30\"><font class=\"copyright\">please confirm password entered</font></td></tr> <tr><td width=\"20%\">&nbsp;</td><td width=\"80%\"><input type=\"submit\" name=\"add\" value=\"edit user\">&nbsp;&nbsp;<input type=\"reset\" name=\"reset\" value=\"reset\"></td></tr> </form></table>"; echo $record; It only echoes the resource id, any help or examples would be great!!!! Jas

« previous php.db (#19523) next »