PeterLazarov
-
Posts
3 -
Joined
-
Last visited
Posts posted by PeterLazarov
-
-
what debugging have you done to pin down where the problem is at?
do you have php's error_reporting set to E_ALL and display_errors set to ON so that php will help you by reporting and displaying the errors it detects?
I just added
ini_set("display_errors", 1); ini_set("track_errors", 1); ini_set("html_errors", 1); error_reporting(E_ALL);
and no error was found
-
Hello!
I am new to PHP programming and am currently working on an account system. I have posted my work so far. From what I understand the problem is that when I log in the php script doesn`t acknowledge it and acts as if noone is logged in. Thanks in advace!Here are my files:
users.sql :
CREATE TABLE IF NOT EXISTS `users` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(30) DEFAULT NULL, `password` varchar(255) DEFAULT NULL, `fullname` varchar(100) DEFAULT NULL, `location` varchar(200) DEFAULT NULL, `gender` varchar(10) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
Account system
in PHP Coding Help
Posted · Edited by PeterLazarov
When i was going trough the registraion I found two new mistakes in register.php that i didn`t see the last time.They are :
$register = $_GET['register']; ( Undefined index)
and
$success = mysql_query("INSERT INTO users(username, password, fullname, location, gender) VALUES ('$username', '$password', '$full_name','$location','$gender')"); ( Undefined variable)
EDIT: I found a way that makes the error statement go away, but it seems a little questionable. The solution(??) is: