needing userstsytem examples
Printable View
needing userstsytem examples
Mm ill outline the basics needed with comments ;)
The { } are uses when doing IF, WHILE and other types of statements. They are basically needed when showing where sections open and close ;)PHP Code:<?
session_start(); // ALLOWS SESSIONS :o
include ("config.php"); // INCLUDES THE CONFIGURATION FILE
if (!$_SESSION[username){ //Checks to see if they are logged in
echo ("You are not logged in!"); // Displays NOT LOGGED IN MESSAGE oMG
}
else
{
// REST OF PAGE GOES HERE
// eg.
<form name=login action=login.php method=POST>
Username:<input name=username type=text><BR>
Password: <input name=password type=password><BR>
Login To: <input value=SITENAME type=readonly><BR>
// Dunno if the readon only exists. Just messing about ;)
}
// Thank you for shopping at tescos, Love Jack
?>
Hope this helps?
TELL ME IF THERES ERRORS GUYS ;)
Ok thnx also how do i setup accounts on freewebs
What do u mean setup accounts :S
Do u mean "Install a user system on my freewebs account" ?
LMAO You cant!
Hehe. its upseting isn't it..
There only thing possible is to host ya php files on another site and include em with html ;)
Int that right Panther
Yeh :p
If you have a proper domain I will host you for free.
Kevin
very sorry. I rushed it because i was busy.
Also i did it wrong :P
I did a check to see if they were logged in and displayed "Your are not logged in" and then if they were logged in, the login form displayed.
Also im sure i remember purposely doing it because i didn't like the guy.
Anyway nice bump lol and thanks for pointing the echo out. I saw you had posted and i thought "oh god, what have i done now"