Ross
eCreations Staff
Posts: 1,768
|
PHP
Apr 4, 2007 23:06:46 GMT
Post by Ross on Apr 4, 2007 23:06:46 GMT
So you're wanting to see if the user is logged in and then if they are you want to hide the form? The power of PHP is that you can remove the form alltogether. <?php if(isset($_COOKIE['username'])) { // Validate Old Login Info
} else if(isset($_POST['username'])) { // Validate New Login & Set Cookies
} else { // Show Login Form ?> <form action="?action=login" method="post"> User: <input type="text" size="20" name="username" /> <br /> Pass: <input type="password" size="20" name="password" /> <br /> <input type="submit" /> </form> <?php } ?> That way, if they've logged in then it just validates their submitted info or their cookies but if they're not then it outputs the login form. Not sure if that's what you meant though. If it wasn't, I'll try again
|
|
|
PHP
Apr 6, 2007 16:31:45 GMT
Post by FireIndy on Apr 6, 2007 16:31:45 GMT
Thanks Ross. I got it to work.
|
|
|
PHP
Apr 6, 2007 21:59:59 GMT
Post by FireIndy on Apr 6, 2007 21:59:59 GMT
Well Ive also got a PM system down, sorta. The send PM and inbox works. I know how I want to write it which includes document.referrers, I just havent coded it yet. Or the delete function. Ross, on your forum you wrote, did you have a PM system?
|
|
|
PHP
Apr 19, 2007 1:45:47 GMT
Post by FireIndy on Apr 19, 2007 1:45:47 GMT
Yah, ok. Its about my forum. Right now the board is read by read_board.php?id=$id. So I select from my database the posts and replies the pertain to that id. Is it possible to limit the amount per page and when it is reached add a new variable to the end of the URL so the new page shows up? I was just asking b/c Im leaving tomorrow and wont be back till sunday so i cant work on it and maybe ill get some help by the time I get back.
|
|
Ross
eCreations Staff
Posts: 1,768
|
PHP
May 8, 2007 16:44:10 GMT
Post by Ross on May 8, 2007 16:44:10 GMT
The new and improved forum software system I'm working on does have a PM system. As for the # of threads/replies per page, yes that is possible using the LIMIT start, finish part at the end of the MySql query. If I remember later, I'll dig out exactly what I've used when my laptop is on
|
|