ho fatto come hai scritto ma il problema non l'ho risolto.
Ho scoperto invece il vero problema: lo script non "acquisisce" i dati da un form.
Scrivendo:

$username=$_POST['user'];
$password=$_POST['password'];
$submit=$_POST['Submit'];
echo "$password\n";
echo "$username";

mi stampa $password ma non $username.
Il form contenuto in un'altra pagina è il seguente:

<form style="margin-left: 70px; width: 490px;" enctype="application/x-www-form-urlencoded" method="post" action="loginmenu.php" name="nome">





<table style="width: 270px; margin-left: 50px; height: 70px;">

<tbody>

<tr height="30">

<td style="width: 70px; height: 30px;"><font face="Verdana,Helvetica,Arial,sans-serif;" size="4">Username</font>
</td>

<td style="width: 170px; height: 30px;"><input name="user" type="text"></td>

</tr>

<tr>

<td style="width: 70px; height: 30px;"><font face="Verdana,Helvetica,Arial,sans-serif;" size="4">Password</font>
</td>

<td style="width: 170px; height: 30px;"><input name="password" type="password">


</td>

</tr>

<tr>

<td></td>

<td style="width: 170px;" align="left"><input name="Submit" value="Entra" type="submit"></td>

</tr>

<tr>

<td style="width: 70px; height: 30px;"></td>

</tr>

<tr>
<td></td>

<td><font face="Verdana,Helvetica,Arial,sans-serif;" size="4">
Registrati</font></td>

<td></td>

</tr>

</tbody>
</table>

</form>