Hope it helps ^^
http://www.spoono.com/php/tutorials/tutorial.php?id=30
Printable View
Hope it helps ^^
http://www.spoono.com/php/tutorials/tutorial.php?id=30
Thanks!!! +repQuote:
Originally Posted by iRoss
But it didnt really help
What's wrong with it? It looks ok to me?
Quote:
Originally Posted by iRoss
It just doesmt seem right,
I need a simple login and a a little bit of code so you cant go to the files, but only throught the login.
Can anyone help??
Yes, that's it.
Hmmmmm, I will have another look.Quote:
Originally Posted by iRoss
Are you sure that you cant use a .htacess??
Just a user and passwrod will do, and to make multpal user names and pass's by editing the file
Ok here is the login bit
and then in the file you want it to go to private.php in this case add this atthe top :)PHP Code:<?php
session_start();
$_SESSION['name'] = $name;
{
$name = $_POST['name'];
$password = $_POST['password'];
$user = test;
$pass = test;
if(($name == $user) && ($pass == $password)){
echo "Your logged in";
Header("Location: private.php");
}else{
echo "Your details where wrong please try again!";
}
}
?>
PHP Code:<?php
session_start();
if (!$_SESSION['name']) {
echo "You aren't logged in.";
include("login_form.html");
exit();
}
?>
Quote:
Originally Posted by splintercell!
:) :) :) Anything at the moment is good,
Or A javascript login.
Then I little code that will stop people hotlinking the page so say I didnt want anyone coming to habbox.com I would put a code in the page and then they can only get in through the javascript login.
Also the login for isHTML Code:<form method="post" action="login.php">
Name: <input name="name" type="text" /><br>
Password: <input name="password" type="password" /><br>
<input name="submit" value="Login" type="submit" />
</form>
Quote:
Originally Posted by splintercell!
OMG!!!!! Thank you !!!
SOOOOO much, One more question, id I want to put more login details what do I do??
I will be giving you furni for defo,!!