Código PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<script src="include/bbcode.js"></script>
<script type="text/javascript" src="include/jquery.js"></script>
<script type='text/javascript' src='include/jquery.autocomplete.js'></script>
<link rel="stylesheet" type="text/css" href="include/jquery.autocomplete.css" />
<script type="text/javascript">
$().ready(function() {
$("#buscar").autocomplete("include/search.php", {
width: 260,
selectFirst: false
});
$("#clear").click(function() {
$(":input").unautocomplete();
});
});
function changeOptions(){
var max = parseInt(window.prompt('Please type number of items to display:', jQuery.Autocompleter.defaults.max));
if (max > 0) {
$("#suggest1").setOptions({
max: max
});
}
}
function changeScrollHeight() {
var h = parseInt(window.prompt('Please type new scroll height (number in pixels):', jQuery.Autocompleter.defaults.scrollHeight));
if(h > 0) {
$("#suggest1").setOptions({
scrollHeight: h
});
}
}
</script>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body onLoad="init('message','contexto')" class="section-3" style="background-color: transparent;">
<ul id="menu">
<li id="nav-1"><a href="front.php" class="style1">Lechuceria</a>
<li id="nav-2"><a href="inbox.php">Inbox</a></li>
<li id="nav-3"><a href="form.php">Escribir</a>
<li id="nav-4"><a href="sent.php">Enviados</a>
</ul>
<div id="contents">
<form action="<?php echo "form.php?a=pm"; ?>" method="post" enctype="multipart/form-data">
<br>
<table width="100%" height="145" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="6%">Para:</td>
<td width="94%"><input type="text" name="to" value="<?php echo $to; ?>" id="buscar">
(nombre o Id)</td>
</tr>
<tr>
<td>Subject:</td>
<td><input type="subject" name="subject" value="<?php echo $subject; ?>"></td>
</tr>
<tr>
<td>Mensaje:</td>
<td><textarea name="message" cols="22" rows="6" id="message"></textarea></td>
</tr>
<tr>
<td height="24"> </td>
<td><input type="submit" value="Enviar"></td>
</tr>
</table>
<br>
</form>