Forgot Password / Register
Site Statistics
Total Members: 520
Total Tutorials: 242
Newsest User: 8884244477
Todays Unique Hits: 572
0 Users 3 Guests Online
Forum Index » PHP + MySQL » [REQ]A Few Forum Things
Posted on Saturday 16th February 20 at 12:02 AM
zackcez
templates/default/images/noavatar.png's Avatar
Newbie
Hi, I'm just wondering if anyone can help me out a bit with a few things I'm trying to do with my forums.

1. I have this script:
Code
echo "<center><form action='login.php?login' method='post'>
<table width='312'>
<tr>
<td width='120'>Username:</td>
<td width='75'><input type='text' name='username' size='17' maxlength='25'></td>
<td> Password:</td>
<td><input type='password' name='password' size='17' maxlength='25'></td>
<td width='75'><input type='submit' value='Login'></td></form>";
echo "<form action='register.php' method='post'>
<td width='75'><input type='submit' value='Register'></td>
</form>";
echo "<form action='logout.php?logout' method='post'>
<td width='75'><input type='submit' value='Logout'></td>
</form></table></center>";

Can someone please edit it so it shows the login/register if there's no account loggged in at the time, and the log out only show if there is an account logged in.

2. I've been trying to add a sub-forum to the forums but I can't exactly figure it out :s. If anyone could help with that; I have the database info just not sure how to use it lol.

3. Make it so where it says the Latest thread and thread name ect on main forum page a block that says how many articles are in that section and posts lol.

4. When a topic is stickied give the option to un-stickey.

Thank you, I know its a lot lol but if anyone could just help me out on some of it I'd be very thankfull,
Zack
Posted on Saturday 16th February 20 at 12:09 AM
zackcez
templates/default/images/noavatar.png's Avatar
Newbie
maybe a thing for a user post count too if possible...lol
Posted on Saturday 16th February 20 at 11:37 AM
new2old
templates/default/images/noavatar.png's Avatar
Junior Member
Ok, change it to:
Code

if (!$logged[username]) { //if not logged in
echo "<center><form action='login.php?login' method='post'>
<table width='312'>
<tr>
<td width='120'>Username:</td>
<td width='75'><input type='text' name='username' size='17' maxlength='25'></td>
<td> Password:</td>
<td><input type='password' name='password' size='17' maxlength='25'></td>
<td width='75'><input type='submit' value='Login'></td></form>";
echo "<form action='register.php' method='post'>
<td width='75'><input type='submit' value='Register'></td>
</form>";
} elseif ($logged[username]) { // if logged in
echo "<form action='logout.php?logout' method='post'>
<td width='75'><input type='submit' value='Logout'></td>
</form></table></center>";
}


Just needed to check if they were logged in or not
Posted on Saturday 16th February 20 at 11:41 AM
new2old
templates/default/images/noavatar.png's Avatar
Junior Member
2. ill try right a tut on it later

3.
http://rmb-scripting.com/tutorials.php?tutorial&tid=195

4. ill do a tut on that now
Posted on Saturday 16th February 20 at 11:49 AM
new2old
templates/default/images/noavatar.png's Avatar
Junior Member
4. http://rmb-scripting.com/tutorials.php?tutorial&tid=289
Posted on Saturday 16th February 20 at 06:36 PM
zackcez
templates/default/images/noavatar.png's Avatar
Newbie
for the third one, that's not what i meant and ty very much for the other two.
Posted on Saturday 16th February 20 at 06:37 PM
zackcez
templates/default/images/noavatar.png's Avatar
Newbie
for the third one, that's not what i meant and ty very much for the other two.
Posted on Sunday 17th February 2008 at 11:06 AM
new2old
templates/default/images/noavatar.png's Avatar
Junior Member
No problem, personally i think before the try to edit a forum you need to learn some/more PHP you cant ask people to do it all for you and then tell friends/others that you did it, its ok to ask for help but if you cant mod it to how you want, either try learning some more PHP so you can do it yourself or try it and post errors for help, that way you learn and not just have do it for you..
Posted on Sunday 17th February 2008 at 07:50 PM
zackcez
templates/default/images/noavatar.png's Avatar
Newbie
Ok, I actually know how to do this stuff I just wasn't getting the user system stuff, but I got it now and thanks for advice :)
Posted on Thursday 21st February 20 at 06:13 PM
new2old
templates/default/images/noavatar.png's Avatar
Junior Member
You work out the sub-forums?