View Single Post
Old 06-05-2008, 18:04   #4 (permalink)
MadHat
Irn Bru Connoisseur
 
MadHat's Avatar
 
Join Date: May 2008
Location: Inverness, Scotland
Posts: 35
Make a new doc in notepad and put this code in

PHP Code:
<?php
//First connect to your database
$connect mysql_connect("localhost""YOUR_DATABASE_USERNAME_HERE""YOUR_DATABASE_PASSWORD_HERE") or die ("Tis fooked m'lord");
//Now select your database (youve blurred the first part so WHATEVER_members)
mysql_select_db("YOUR_DATABASE_NAME_HERE");

//this will insert a username called test and password test
$insert "INSERT INTO members (ID, username, user_password) "
"VALUES (1, 'test', 'test')";
$results mysql_query($insert) or die (mysql_error());
echo 
"user added";
?>

Save the file as testuser.php and run it.

then try logging in. That should work. Also try checking over your registration code, you may be using an out-dated tutorial that assums register_globals is on
  Reply With Quote