Ok, hear me out.
I have no knowledge of PHP, I want to learn, but havn't got around to it yet.
I have a project that is a ways off, but I want to make sure that I know what I'm doing before I dive into it.
What I was thinking...
I can create a splash page for an index. There is no content really, just a javascript input box. two of them. if the person enters one name and one password (just two predefined words) then it redirects them to one page. If they don't know it, it redirects them to a guest page.
Now I personally want the non guest page to be non linkable to, not sure how to do that though.
is this possible?
Comments
if(document.form.inputname.value === yourpredefined word)window.open.my.page.htm
else
document.write(" you senseless person you cannot enter without the password!");
youd probably want to use variables though and the window.opem part id have to look up in a reference to make sure its right
and nonlinkable try this:
<script type="text/javascript">
function afunction()
{
document.write("undernourished weasel you cannot enter!");
}
</script>
add that between your head tags then add this button in the body
<input type="button" value="button" onClick="afunction();">
<script type="text/javascript">
function entfunction()
{
var ps = document.what.pass.value;
var nm = document.what.name.value;
if(nm === "fred")tnefunction();
else
document.write("try again, undernourished weasel");
}
</script>
<script type="text/javascript">
function tnefunction()
{
var ps = document.what.pass.value;
var nm = document.what.name.value;
if(ps === "charlie")window.location="http://www.devdreams.net";
else
document.write("try again, undernourished weasel");
}
</script>
then add these inputs in your body section
<form name="what">
<input type="text"name="name">
<input type="text"name="pass">
<input type="button" value="enter" onClick="entfunction()">
</form>
its setup to use fred as a username and charlie as the password