PDA

View Full Version : Hey, help please needing usersystem



Fifa07
20-10-2006, 07:33 PM
needing userstsytem examples

Jackboy
20-10-2006, 08:23 PM
Mm ill outline the basics needed with comments ;)



<?
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
?>


The { } are uses when doing IF, WHILE and other types of statements. They are basically needed when showing where sections open and close ;)

Hope this helps?

TELL ME IF THERES ERRORS GUYS ;)

Fifa07
20-10-2006, 08:27 PM
Ok thnx also how do i setup accounts on freewebs

Jackboy
20-10-2006, 08:28 PM
What do u mean setup accounts :S

Do u mean "Install a user system on my freewebs account" ?

Panther
20-10-2006, 08:30 PM
LMAO You cant!

Jackboy
20-10-2006, 08:32 PM
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

Panther
16-11-2006, 12:26 AM
Yeh :p

Belacme
16-11-2006, 12:30 AM
If you have a proper domain I will host you for free.

Kevin

Heinous
16-11-2006, 04:56 AM
Mm ill outline the basics needed with comments ;)



<?
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
?>
The { } are uses when doing IF, WHILE and other types of statements. They are basically needed when showing where sections open and close ;)

Hope this helps?

TELL ME IF THERES ERRORS GUYS ;)
Um, you forgot the echo..

gj php coder.

Jackboy
16-11-2006, 05:28 AM
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"

Heinous
16-11-2006, 11:54 AM
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"
You also forgot the "]", but you did it the right way around (checking if they're logged in).

So, if you don't like him, either don't post, or do it right.

Jackboy
16-11-2006, 04:13 PM
Rofl i semmed to have missed alot there. Oh well ill live.

Want to hide these adverts? Register an account for free!