How about....
I assume that you are using a form to pass variables from the login page to the index page. You can include a hidden variable type in your form with a value of whatever, "howdy". Then use an IF statement on the index page to check that the passed variable does equal "howdy".
<?php
secretpasssword="howdy";
<form action="index.php3" method="post">
Name: <input type="text" name="name"><br>
Age: <input type="text" age="age"><br>
<input type="hidden" name=$secretpassword><br>
<input type="submit">
</form>
Please excuse syntax errors, i'm doing this from memory, not at my regular computer, but you get the idea....
Doug