i have
editlistingnew.php
and editsittinglist.php
with databas 3 columns UserName SitterType and SitterAvailiable, currently the dropbox works perfectly in gets the array and displays them. but what i want is when a user selects the sitter type to be 'baby' i want the text box/area to update with whats in the database.
editlistingnew.php
PHP:
<?php
include_once 'EditSittingList.php';
connect()
?>
<body>
<select id="sel_SittingType" name="sel_SittingType" >
<?php
dropboxlist()
?>
</select>
<textarea rows="4" cols="50">
</textarea>
<?php close()?>
</body>
and editsittinglist.php
PHP:
<?php
include 'db.php';
?>
<body>
<?php
function connect(){
mysql_connect(DB_HOST,DB_USER,DB_PASS) or die('could not connect' . mysql_error());
mysql_select_db(DB_NAME);
}
function dropboxlist(){
$result = mysql_query ("SELECT SitterType FROM POSTS WHERE UserName = 'mike'");
while ($record = mysql_fetch_array($result)){
echo '<option value="' . $record['SitterType'] . '">' .$record['SitterType'] . ' </option>';
}
}
function textboxarea(){
}
function close(){
mysql_close();
}
?>
with databas 3 columns UserName SitterType and SitterAvailiable, currently the dropbox works perfectly in gets the array and displays them. but what i want is when a user selects the sitter type to be 'baby' i want the text box/area to update with whats in the database.