|
Web design and Programming Discuss website creation and other programming topics. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||
|
Help?
Code:
<html> <title>MmS-hQ</title> <? $username="Example"; $password="Example"; If($_POST['submit']) { If($_POST['username']=="$username" AND $_POST['password']=="$password") { setcookie("loggedin","Yes",time()); } Else { echo"loggin failed"; } } ?> <form method="POST" action="<?=$_SERVER['PHP_SELF'];?>"> Username: <input type="text" name="username"><br /> Password: <input type="password" name="password"><br /> <input type="submit" name="submit" value=" Login "> </form> <? print ("There are <b>(Right here i want it to add up all the cookies that are ("loggedin","Yes",time()); |
#2
|
||
|
Would be good to know what you need help with?
|
#3
|
||
|
I want to make it so people with certain cookies can reach certain Urls while others with other cookies can't! LOL! I also want to add up cookies so it will display it. Like there are 90 people logged on!
|
#4
|
||
|
a way you could do it is incrementing a number in a mysql table (or flatfile) and decreasing it by one if a session is destroyed/expired and call that number.
Very basic way though... |
#5
|
||
|
Lol basic! I think Java Script is simpler than PHP
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|