MetaLuna
-
Posts
8 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by MetaLuna
-
-
login script
in PHP
Yeah, and not only that, but I have it set to accept two week long cookies. So that might cause a problem. It would have to be based on who has a session open. Can you do that?I guess letting the login script change the status from zero to one would be a good start... but that would require every user to log off before closing the browser window.(select * from users where login='1' order by 'logintime' asc) or somethin like that -
login script
in PHP
Hey, how would one do that? I wanted to add a "Currently Logged In" feature to my website, and I have no clue where to begin.You also aren't keeping track of who is logged in. -
Then maybe the best thing to do would be to write your own script.I can give you tips on how to write it, but trying to make someone else's script work is almost always bad news.
-
Just gave you some. Did you try it?This kinda stuff, a lot of times you've just gotta keep trying things until something works. Or, start over from scratch. You might find that you left out a variable somewhere in the form or something.But it's really hard to go through all that code when it's pushed off the screen, and when there's so much unrelated code in there.Also, mysql errors don't show up automatically. You need to tell the script to echo the error.
-
What error are you getting?
-
I am attempting to create a content management system. To do this, I want to be able to create flat files on my server. I am using touch() and fopen() to do this. (I would use file_put_contents(), but my server only has PHP 4.*.)Anyway, the problem that I am encountering is that using a PHP script to create an HTML file on my server causes the file's owner to be "nobody." And since the owner is "nobody", then I cannot delete it from the server. I have to write a whole new script just to delete files I created.I thought I would use chown() to change the owner of the file to my FTP user, but I'm not allowed to use chown() on my server. I also can't use passthru() or chmod(). And yet CMS scripts create files all the time! What am I missing?
-
It seems to me that the problem is that it's not registering $_POST['login'] as actually having had happened. That's a guess. Maybe you should just try calling it $_POST['submit'] and then renaming your Login button to "submit".Really, it's quite hard to understand your script because it's bogged down by a bunch of distracting, unrelated HTML and JavaScript. Could you maybe edit that out?You may also want to try adding if (!$rez) { echo mysql_error(); } after your mysql queries... to see if maybe it's getting an error that you're not aware of.
Basic Question
in PHP
Posted