signup form issue php
Moderator: General Moderators
Re: signup form issue php
As the notice says, $error is not defined. Since you never declare or instantiate the variable, it gets instantiated to null when you compare against it on line 25. A loose comparison (== as opposed to ===) of null and empty string evaluates to true. You then display the success message before any validation has been done.
Re: signup form issue php
$error isn't being used here. You haven't defined it, you never assign anything to it. What you probably want to do is break this into two steps; first validate the submission (this is where you could make use of your currently unused $error variable), then do something with the data if validation passes.