Ok, I'm working on a php news script and I added a table to my mysql database for users to access the script with this query:
CREATE TABLE login (
id int(4) NOT NULL default '0',
group varchar(50) NOT NULL default '',
user varchar(50) NOT NULL default '',
pass varchar(50) NOT NULL default '',
PRIMARY KEY (id)
) TYPE=MyISAM;
And I'm trying to add a row for a new user (for a test) with this script:
<?
if($submit)
{
include("config.php");
mysql_connect("$dbhost", "$dbuser", "$dbpass");
mysql_select_db("$dbname");
$result=MYSQL_QUERY("INSERT INTO `login` (`id`, `group`, `user`, `pass`) VALUES ('NULL', 'admin', '$user', '$pass')");
print "<p>This file has the Database";
}
else
{
?>
<form action='adduser.php' method='POST'>
Username: <input type=text name='user' VALUE='sdffd' size=60><BR>
Password: <input type=text name='pass' VALUE='dsfsdfsd' size=60><BR>
<input type=submit name=submit value='Add Administrator'></form>
<? } ?>
But it's not adding, even thought the script says it does. Can someone help me out here? 😕 😕