Does anyone no how to set user rights/classes?
My idea was to add a value to them in the MySql database and then each time someone logs in check for that value.

I also have this code
 PHP:

<?php
// Random Game Design: PHP Website Template
//  Version 1
//  Copyright Dean Whitehouse, 2008
include 'db_connect.php';
include 'config_table.inc.php';


$sql_user = "CREATE TABLE $user(
user_id int(10) AUTO_INCREMENT NOT NULL PRIMARY KEY,
user_name varchar(100) NOT NULL,
user_password varchar(100) NOT NULL,
user_email varchar(100) NOT NULL,
user_timezone  char(3) NOT NULL,
user_hideemail  tinyint(3) unsigned NOT NULL,
user_ip varchar(20) NOT NULL,
user_ban tinyint(3) unsigned NOT NULL,
user_realname varchar (40) NOT NULL,
user_age int(10) unsigned NOT NULL,
user_class varchar(100) NOT NULL,
userlevel tinyint(1) unsigned NOT NULL
)";

$make_user= mysql_query($sql_user);

$checkifexist = mysql_query ("SELECT * FROM '$user' LIMIT 0,1");

if ($make_user)
{
echo("'$user' Table Created. <form action='make_admin.php'>
<input type='submit' value='Continue' name='check'>
</form>");
}
else
{
echo("Table all ready exists. Please go back and enter a different name.<FORM>
<form action='name_tables.php'>
<INPUT TYPE='submit' VALUE='Back'></FORM>");
}
mysql_close();
?>


but the back button doesn't work.
the address changes from
create_tables.php?check=Continue
to
create_tables.php?


Last edited by Blade28081991; 04/13/08 21:54.

My Avatar Randomness V2

"Someone get me to the doctor, and someone call the nurse
And someone buy me roses, and someone burned the church"