l'écho d'une variable php dans innerhtml

J'ai un problème dans mon code, j'ai envie de mettre $signification de la variable dans le innerhtml de mon di,voici mon code:
searchinput.php:

<form action = "search.php" method = "post">
    <input name="word" id="word" type="text" maxlength="255" />
    <label for="word">word:</label></br></br>
    <input type="submit" value="search" />

</form>
<div id = "meaning"> </div>

search.php:

<?php
    $db = mysql_connect("localhost", "root", "");
    mysql_select_db("project",$db);
    $word = isset($_POST["word"]) ? $_POST["word"] : "";
    $result = mysql_query("select meaning from vocabulary where word = '$word'");
    $fetchmeaning = mysql_fetch_array($result); 
    $meaning = $fetchmeaning['meaning'];
?>

maintenant, je veux avoir ceci:

document.getElementById('meaning').innerhtml = $meaning; !!!!

comment puis-je impelemt?

Double Possible de: "Comment écrire un hello world en PHP?".

OriginalL'auteur fahimeh | 2013-11-09