CODE
<select name="buyername" id="buyername">
<?
$query="SELECT * FROM tbl_users";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
$i=0;
while ($i < $num) {
$id=mysql_result($result,$i,"title");
$title=mysql_result($result,$i,"title");
$fname=mysql_result($result,$i,"fname");
$lname=mysql_result($result,$i,"lname");
echo
"<option>
$title $fname $lname
</option>";
$i++;
}
?>
</select> (Buyer needs to have an registered I Love Physics account) </label></td>
</tr>
<tr>
<td valign="top">Buyer Address </td>
<td valign=""><label>
<textarea name="buyeraddress" cols="40" rows="5" id="buyeraddress" readonly="readonly">
</textarea>
Whilst working on the admin "Add Purchase" page, I'd like the text area to be updated automatically with the buyer address when a certain buyer is picked from the dropdown menu. Is this possible at all? I understand that it would need the buyer id to be passed through to the textarea section of the form at this stage.

Lol but how?
At a later stage I have the following fields
Product Purchase - (a dropdown menu containing all the products for sale)
Quantity - (text field where the number of the products to be bought)
Cost (minus shipping) - (readonly textfield calculating product purchase price * quantity)
Paid? - has the user paid for the product already? (drop down with yes or no options)
Status - what is the current status of the ORDER (drop down menu, current options undecided)
I plan to use the same "passing through" method to work out the total cost of the product purchased using some PHP maths and the quantity entered.
This post has been edited by jeansymolanza: 28 Feb, 2008 - 03:48 PM