I need a little help with PHP. I have code like this:
tl;dr need to enter info in forms into text file
index.html
login.php
I need to enter this into a form. I'm setting up a site so my friends can use things at school (like proxies) to get past the web blocks. But I'm too lazy to create a proper registration system, and there won't be that many. So they put the name/pass in the form, and it goes into a text file. That's the part i'm stuck on. I'll also implement IP later =/
Sorry that's sorta disorganized, just read the tl;dr at the top if it made no sense
tl;dr need to enter info in forms into text file
index.html
Code:
<form action="login.php" method="get">
<input type="text" name="username" /><br />
<input type="password" name="password" /><br />
<input type="submit" value="Login" />
</form>
login.php
Code:
<?php
if ($_GET['username'] == "hi" AND $_GET['password'] == "bye") {
echo ("hi");
}
else {
echo ("bye");
}
?>
I need to enter this into a form. I'm setting up a site so my friends can use things at school (like proxies) to get past the web blocks. But I'm too lazy to create a proper registration system, and there won't be that many. So they put the name/pass in the form, and it goes into a text file. That's the part i'm stuck on. I'll also implement IP later =/
Sorry that's sorta disorganized, just read the tl;dr at the top if it made no sense


