needing userstsytem examples

needing userstsytem examples
Last edited by Fifa07; 20-10-2006 at 07:34 PM.
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 closePHP 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
---------------
I also use the account: Dentafrice
---------------
Um, you forgot the echo..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 closePHP 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
gj php coder.
XHTML, CSS, AJAX, JS, php, MySQL.
--
HxF moderators can't read timestamps.
very sorry. I rushed it because i was busy.
Also i did it wrong
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"
Want to hide these adverts? Register an account for free!