Ok here goes:
Im not gonna code every thing for you, so its better to learn the basics of php and mysql. You can ask me / others for questions tho
http://www.php.net and
http://www.mysql.org for documentation
Tutorials:
http://www.zend.com/zend/tut/
http://hotwired.lycos.com/webmonkey/programming/php/
http://tut.php-q.net/
or just google
To add the games on your website - there was allready a thread about it - look below its a working script. The only thing u have to do is create a table
http://alcoholics.dk/aq2world/phpBB2/vi ... .php?t=495
Ok now for a login thing:
Also here create a table
login
[php]<?php
$db = mysql_connect("*****", "*****", "*****"); // DB ip, user en pw
mysql_select_db("*****",$db); // DB name
$table = "******";
if (isset($submit)) {
$query = "select * from $table where username='$username' and password='$password'";
$result = mysql_query($query) ;
$isAuth = false; //set to false originally
while($row = mysql_fetch_array($result)) {
if($row['username'] === $username) {
$isAuth = true;
session_start();
session_register('username');
}
}
if($isAuth) {
print "Logged in successfully<br>";
print "<A href='pagewhereyouwannago.php'>Go to the pagewhereyouwannago</a>";
}
else {
print "Wrong username or password";
}
}
else {
echo "<form method='POST' action='$PHP_SELF'>
Username: <input type='text' name='username' size='15'><br><br>
Password: <input type='password' name='password' size='15'><br><br>
<input type='submit' value='Login' name='submit'>
</form>";
}
?>[/php]
Ok u got the login with sessions. Below you got a script that checks if the sessions key is correct.
pagewhereyouwannago.php
[php]<?php
session_start(); //this must be at the top of every page
if (isset($_SESSION['username'])) {
echo "weeee it works!"; // put your stuff here
}
else {
print "Not logged in";
}
?>[/php]