i have a little problem here. What i am trying to achieve is User types in unique id into textbox then presses load button, script is looking for this parameter in MySql database. When found match data should be loaded into textbox below.
UPDATED VERSION
<?php
mysql_connect ("localhost", "root","84946dff6e1") or die (mysql_error());
mysql_select_db ("employees");
if(isset($_POST["loadbtn"]))
{
$load = $_POST["loadbtn"];
$sql = mysql_query("SELECT * FROM titles WHERE emp_no = '$load' ");
$details = mysql_fetch_array($sql);
$savedTitle = $details["title"];
}
?>
<form method="post" action="changeTitleView.php">
<table width="400" border="0" cellspacing="1" cellpadding="2" align="center">
<tr>
<td width="150">Employee number</td>
<td><input type="text" name="load" /></td>
<td><input type="submit" name="loadbtn" value="Load" /></td>
</tr>
</table>
</form>
<br />
<br />
<form method="get" action="changeTitleView.php">
<table width="400" border="0" cellspacing="1" cellpadding="2" align="center">
<td width="150">Employee Title</td>
<td><input name="salary" type="text" value="<?php echo $savedTitle; ?>"></td>
</tr>
<td width="150"> </td>
<td>
<input name="add" type="submit" id="add" value="Update">
</td>
</tr>
</table>
</form>
thank you for looking and help :)