Hello, when I'm pressing at "submit" when I've written all the account information in "Create Account" this is the error I get:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'name'' in D:\xampp\htdocs\pot\OTS_Account.php:110 Stack trace: #0 D:\xampp\htdocs\pot\OTS_Account.php(110): PDO->query('INSERT INTO `ac...') #1 D:\xampp\htdocs\createaccount.php(258): OTS_Account->create(2521020, 2521020) #2 D:\xampp\htdocs\index.php(139): include('D:\xampp\htdocs...') #3 {main} thrown in D:\xampp\htdocs\pot\OTS_Account.php on line 110
This is the code at line 110:
Anyone know what I should do to fix this? Thanks!
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'name'' in D:\xampp\htdocs\pot\OTS_Account.php:110 Stack trace: #0 D:\xampp\htdocs\pot\OTS_Account.php(110): PDO->query('INSERT INTO `ac...') #1 D:\xampp\htdocs\createaccount.php(258): OTS_Account->create(2521020, 2521020) #2 D:\xampp\htdocs\index.php(139): include('D:\xampp\htdocs...') #3 {main} thrown in D:\xampp\htdocs\pot\OTS_Account.php on line 110
This is the code at line 110:
Code:
if($number == $random)
Anyone know what I should do to fix this? Thanks!