PHP is server side, and thus the page must be refreshed to affect a change. But, you can do this with javascript, if that is a possibility. Take a look at this sample code:
Code:
<html>
<head>
<script language="javascript" type="text/javascript">
function showField() {
if (document.myform.text01.value != "") {
document.myform.text02.style.display = "block";
}
}
</script>
</head>
<body>
<form name="myform">
<input type="text" name="text01" onkeyup="showField();">
<input type="text" name="text02" style="display:none">
</form>
</body>
</html>
Bookmarks