Those are Notices, not Errors, the script works just fine with notices. You do not need to fix them, it is just telling you that the variable was not declared before use, however php will assume the correct variable. All you have to do it turn off displaying of notices in your php.ini file.
Find your php.ini (if in xampp: C:/xampp/php/php.ini)
Search for the line "error_reporting = "
set error reporting to:
Code:
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED