Something like:
code:
$Username_q = addslashes($Username);
$query = "SELECT U_Phonehome,U_Phonework,U_Phonecell,U_Winch,U_Coverage,U_Calltime
FROM {$config['tbprefix']}Users
WHERE U_Username = '$Username_q'
";
$sth = $dbh -> do_query($query);
list ($HomePhone,$WorkPhone,$CellPhone,$Winch,$Coverage,$Calltime) = $dbh -> fetch_array($sth);
$dbh -> finish_sth($sth);
echo <<<UBBTPRINT
<form method="post" action="{$config['phpurl']}/addrecovery.php">
<table width="80%" border="1" cellpadding="3" cellspacing="0" align="center">
<tr>
<td>
Home Phone:
</td>
<td>
<input type="text" name="homephone" value="$HomePhone" />
</td>
</tr>
<tr>
<td>
Work Phone:
</td>
<td>
<input type="text" name="workphone" value="$WorkPhone" />
</td>
</tr>
<tr>
<td>
Cell Phone:
</td>
<td>
<input type="text" name="cellphone" value="$CellPhone" />
</td>
</tr>
<tr>
<td>
Winch:
</td>
<td>
<input type="text" name="winch" value="$Winch" />
</td>
</tr>
<tr>
<td>
Coverage:
</td>
<td>
<input type="text" name="coverage" value="$Coverage" />
</td>
</tr>
<tr>
<td>
Call Times:
</td>
<td>
<input type="text" name="calltime" value="$Calltime" />
</td>
</tr>
<tr>
<td>
</td>
<td>
<input type="submit" name="submit" value="Submit" />
</td>
</tr>
</table>
</form>
UBBTPRINT;
I think that should do it for the displaying of the info.
To add the info to the database you then create another script named addrecovery.php and make it look something like this:
code:
require ("$thispath/main.inc.php");
if ($GLOBALS['REQUEST_METHOD'] != "POST") {
exit;
}
$userob = new user;
$user = $userob -> authenticate();
$html = new html;
if (empty($user['U_Number'])) {
$html -> not_right ($ubbt_lang['NO_AUTH'],$Cat);
}
$usernumber_q = addslashes($user['U_Number']);
$homephone_q = addslashes($homephone);
$workphone_q = addslashes($workphone);
$cellphone_q = addslashes($cellphone);
$winch_q = addslahses($winch);
$coverage_q = addslashes($coverage);
$calltime_q = addslashes($calltime);
$query = "UPDATE {$config['tbprefix']}Users
SET U_Phonehome = '$homephone_q',
U_Phonework = '$workphone_q',
U_Phonecell = '$cellphone_q',
U_Winch = '$winch_q',
U_Coverage = '$coverage_q',
U_Calltime = '$calltime_q'
WHERE U_Number = '$usernumber_q'
";
$dbh -> do_query($query);
echo <<<UBBTPRINT
Recovery information has been added.
UBBTPRINT;
I know this is very basic but I think it will get you going in the right direction.

Also, I haven't tested it and since I typed it all out in this text box while posting I am not sure how well this will work by the looks of it... lol but I think it should do the trick.
