Go Back   Novahq.net Forum > Computers > Web design and Programming
FAQ Community Calendar Today's Posts Search

Web design and Programming Discuss website creation and other programming topics.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-05-2004, 03:06 PM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

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());
I also want to find out how to make it so people with certain cookies can reach certain pages others can't reach...
Reply With Quote
  #2  
Old 07-05-2004, 07:10 PM
SilentTrigger is offline SilentTrigger
-1PARA-

Join Date: Sep 2002
Location: Sweden
Posts: 3,972

Would be good to know what you need help with?
__________________
-1PARA-AlexKall

My photography website



Reply With Quote
  #3  
Old 07-05-2004, 11:48 PM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

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!
Reply With Quote
  #4  
Old 07-06-2004, 01:23 AM
Lakie is offline Lakie

Join Date: Mar 2002
Posts: 5,540

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...
Reply With Quote
  #5  
Old 07-06-2004, 01:52 PM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

eek

Lol basic! I think Java Script is simpler than PHP
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 12:07 PM.




Powered by vBulletin®