php signup form with image upload
Moderator: General Moderators
Re: php signup form with image upload
Can you post the entire file? The line numbers in the errors don't make any sense given the code you've posted.
Re: php signup form with image upload
What does redirect_to do? If it's a header redirect, it's going to fail because headers have already been sent when you echoed "File uploaded.. etc"
Re: php signup form with image upload
That's pretty straightforward: there's already a user with that username in the DB. That's because you're executing the same query twiceMySQL error no 1062 : Duplicate entry 'ianhaney' for key 'username'
Code: Select all
$result = $mysqli->query($sql);
if ($mysqli->query($sql)) {Re: php signup form with image upload
UNIQUE was probably a better choice, and I've explained why you're seeing it twice.