Okay, this may seem odd, but I want to use FOPEN to create a member system. How? Well, users are already registered on my site, so then when they login, the php script will open up their pass file and then if it is a match to what they submitted they will get into the member system..
So far, I have a little bit of code:
What I want the code to do, is go to the folder that I will specify, so the $djsays will be the username that they submitted..
So far, this only gets the login, once i figure this out I will understand how to do it.
So, my problem is that nothing shows... I want the user to submit the username and then it takes it and sees if it exists.. but nothing shows. How do I fix it?
Thank you very much.
So far, I have a little bit of code:
| Code: |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Create A File</title> </head> <body> <form name="input" method="post" action="index.php"> <input type="text" name="username" id="dj" /><BR> <input type="password" name="password" id="pass" /></p> <p><input type="reset" name="reset" value="reset" /> <input type="submit" name="submit" value="submit" /></p> </form> <?php if (isset($_POST['submit'])) { $djsays = $_POST['username']; $fp = fopen("path\to\the\folders" .$djsays "\pass.txt","w"); } ?> </body> </html> |
What I want the code to do, is go to the folder that I will specify, so the $djsays will be the username that they submitted..
So far, this only gets the login, once i figure this out I will understand how to do it.
So, my problem is that nothing shows... I want the user to submit the username and then it takes it and sees if it exists.. but nothing shows. How do I fix it?
Thank you very much.
